One way to say it. More room to create.
Programming is changing. For a long time, building software meant learning the computer's language, mastering its many ways of expressing things and working within the limits of its runtime to turn intent into code.
Artificial intelligence now plays an active part in that process. Code costs less to write, and small teams can design and build software on a scale they once struggled to manage.
Making code easier to produce takes us only part of the way to making good software. Generated code still has to be readable. Its behavior needs to be predictable and its performance measurable. We need to be able to rely on programs we write today for years to come.
Topaz sees a role for the programming language in this change.
People and artificial intelligence express intent. The specification defines its meaning. The compiler is responsible for executing it efficiently.
1. Clearer intent with less syntax
A language gains expressive power through what it can say. When several forms express the same intent, writers have to choose one and readers have to work out why. Analysis tools must handle every form, and language designers must keep examining how all the forms interact.
Topaz assigns one form to each concept. The language gives you a standard way to express a value that may be absent, an operation that may fail, a change in state or the parts of a data structure.
There are many ways to solve a problem. Once you know what you want to say, Topaz reduces the recurring choices involved in writing it down. The time you would spend settling matters of syntax can go toward understanding the problem.
As the language grows, we give as much weight to retiring forms that have outlived their purpose as we do to adding new ones.
A simple language takes deliberate design.
2. One language for people and artificial intelligence
Topaz aims to give people and artificial intelligence a language in which they can write, read, review and revise the same programs.
More conventions and forms for a single task leave both people and artificial intelligence with more choices to make. Topaz settles some of those choices in the design of the language. Consistent syntax, explicit types, clear error handling, a predictable standard library and precise diagnostics give people a basis for understanding programs. They give artificial intelligence the same basis for writing and analyzing code.
Knowledge of the language can come from sources beyond a model's training data. A connected specification, library reference, set of runnable examples and compiler diagnostics make it possible to check an answer directly. People and artificial intelligence can follow the same process of consulting the specification, fixing code in response to diagnostics and checking the result with tests.
Code written by people and by artificial intelligence uses the same syntax, follows the same rules, goes through the same reviews and runs the same way. One readable language serves both. Experiments can show how much consistent syntax improves the accuracy of code. Topaz lays the groundwork for that accuracy in the language itself.
What the code means matters more than who wrote it.
3. The specification comes first
A language needs a stable definition of its behavior, independent of incidental quirks and inherited conventions in a particular compiler. In Topaz, that definition is the specification.
The specification defines the values a program produces, the order in which expressions are evaluated, when errors occur and what effects code has on the outside world. The compiler implements that meaning.
Separating meaning from implementation lets us improve the compiler while preserving the meaning of programs. The compiler can change how it stores values, calls functions or reduces redundant computation. The results a program can observe stay the same.
Where possible, a rule should come with a runnable example and a way to verify it. Readers should also be able to see where the implementation has yet to meet the specification. The specification then gives people a way to understand the language, artificial intelligence a basis for writing code and compiler developers a way to verify their work.
The language defines the meaning. The implementation makes it work.
4. Write clearly and execute precisely
High-level languages make complex problems easier to express. Low-level languages give programmers fine control over machine resources. Software development has long asked programmers to choose between the two.
Topaz aims to close that gap. If programmers have to decide where to allocate memory, copy values, reuse storage and pay the cost of a function call to get good performance, they must keep track of execution details as well as the problem itself. Having artificial intelligence write the code still leaves someone responsible for checking those decisions.
Topaz moves decisions the compiler can automate into the compiler while preserving the language's meaning. A programmer describes data, and the compiler analyzes its types and uses. A programmer describes an operation on a collection, and the compiler determines whether it needs to store intermediate results. A programmer updates a value, and the compiler analyzes whether it can safely reuse existing storage.
Topaz chose to generate Rust with the same goal in mind. Rust and its compiler ecosystem bring mature techniques for type-specific data representation, memory safety, native code generation and optimization. Topaz studies how to generate efficient Rust that follows its own specification while keeping pointer arithmetic and lifetime parameters out of user code.
Our long-term initiative, zero-overhead canonical lowering (ZOCLE), puts this goal into concrete work. It addresses storage for values with known types, direct function calls, removal of unnecessary intermediate arrays, storage reuse and vectorization in stages.
We demonstrate performance through measurement. We measure memory use, compilation time and artifact size as well as execution time, then keep the improvements that earn their place.
The compiler handles complex execution strategies. The programmer focuses on solving the problem clearly.
- Express intent
- People and artificial intelligenceExpress intent in TopazTopazOne clear language
- Define meaning
- Language specificationThe specification defines what programs mean. Every stage below follows it.
- Execute efficiently
- Topaz compilerType analysis, semantic checks and code generationZOCLEReduces execution cost while preserving meaningRust, rustc, LLVMProven low-level compiler technologyNative · WASMThe same language rules
- Validate in products
- Real productsATLAS and programs built with Topaz
Validation findings inform language design
5. An exacting engine behind a simple language
A language that is easy to write can take considerable work to implement. To spare users complex decisions, the compiler has to understand more and make finer judgments.
Topaz puts complexity where it serves a purpose. A small syntax can support sophisticated type analysis. The compiler can analyze how long values live and how they are used while keeping memory management out of user code. A program that returns a new array can sometimes reuse storage.
The compiler applies optimizations it can prove correct. In other cases it chooses a safe strategy that preserves meaning. The language's semantics come first. Clear definitions of each expression's meaning and effects let the compiler see what it can optimize.
The specification, type checker, compiler and standard library evolve together as one design.
Users get simplicity. The implementation carries the complexity that makes it possible.
6. The same program has the same meaning
If the meaning of a program changes with the way it is run, developers effectively have to work with several languages.
In Topaz, direct execution, native executables and browser packages follow the same language rules where they support the same features. Operating system services and hardware vary, so the features available depend on the environment. Any execution path that accepts the same program preserves the values, evaluation order, errors and observable behavior defined by the language.
The implementation is free to choose how the compiler represents data internally. That freedom leaves the meaning of user code intact. What you learn by checking and running a program on one target should carry over to another. That makes it possible to verify code written by people or by artificial intelligence.
Many targets, one language.
7. Why we started with typesetting
Topaz is a general-purpose programming language with typesetting built in.
Making a book takes countless precise decisions. The system needs to know where to break lines, how to lay out paragraphs, how to handle line-breaking conventions across languages and how to get repeatable results from the same manuscript and settings. These decisions pose deep engineering problems in data representation, numerical processing, Unicode, optimization, error handling, performance and reproducibility.
At STUDIO HAZE, we face these problems every day while building products such as ATLAS, our typesetting service for publishers. Typesetting belongs in the standard library because it is a problem we solve ourselves and need to keep testing over time. The data modeling, collection processing, error representation and consistency across targets that we refine through this work carry over to software beyond typesetting.
A general-purpose language can grow out of a specific problem. Work on a hard problem can yield techniques that serve a far wider range of applications.
Typesetting is where Topaz takes root.
8. One design and one team responsible for it
STUDIO HAZE is responsible for the design, development and official releases of Topaz. One team makes technical decisions so the language can remain consistent over time.
Even a small feature reaches beyond syntax. It needs rules that define its meaning, a type checker and compiler that understand it, accurate diagnostics and tools and documentation that follow the same rules. Existing and new programs must be maintained together. We judge each feature in the context of the whole language. Sometimes the most important decision is to leave a feature out or to retire an existing form.
We use Topaz to build real products. We work under our own rules and experience the performance and stability of our compiler firsthand.
Defects that outside developers find, reproducible errors, gaps between the specification and implementation and new use cases all help us notice what we missed. We listen to technical feedback and keep one team accountable for the official language's design and implementation.
One team holds design authority so it can answer for the results.
9. What it means to publish
STUDIO HAZE builds Topaz for its own products and makes the technology available for others to examine and use.
Trust in a language takes more than a description from its designers. People need to be able to read the specification and examine the implementation we publish. They should be able to see the environment an example ran in, the result it expected and the result it produced. They should be able to find gaps in the implementation and known limitations.
We are working toward a point where anyone can rebuild the basis of the official tools from public source and build instructions. Self-hosting, writing the compiler in Topaz, is part of that work. Implementing our own tools in the language we designed exposes its strengths and limits.
STUDIO HAZE is responsible for official development. Anyone can study, modify and use the published source under the applicable licenses. We put our reasoning and evidence where people can check it.
Trust starts with evidence people can check.
10. Evolve and preserve the past
A language can last by changing where it needs to. Solving problems found in real programs sometimes calls for a change to the language. Merging or removing forms can be as important as adding new ones.
Change comes at a cost to existing users. They need to know which rules each version follows and how to migrate their code. That is why we publish the manual for the language in use separately from the specification for the next version. We draw a clear line between what the released implementation supports today and what the next design sets out to implement.
Give every change a reason and every migration a path.
11. The future we want to reach
Programmers decide what problems to solve and put their intent into clear code. When they work with artificial intelligence, they understand what that code does. The specification gives everyone a basis for interpreting a program. The compiler spots and explains incorrect expressions and turns valid programs into more efficient forms. Developers can focus on product quality without keeping track of low-level details the problem does not require. A program can run in different environments. Its meaning stays the same as the compiler improves. The gains in performance and correctness can be measured, and anyone can examine the evidence.
Topaz measures progress by how much more clearly developers can express the same problem, how much more reliably they can maintain their programs, how much unnecessary cost the compiler removes, how closely the implementation follows the specification and how much the quality of real products improves.
That future is still taking shape. There are compiler problems to solve and hypotheses to test. The Roadmap lays out the plans. History and Conformance show what has been achieved and verified.
Topaz starts with a language we need ourselves. By refining that design, we aim to build technology that other developers will find worth using.
Choose clarity over more forms. Put complexity where it can be managed. Let the specification settle the meaning. Give people and artificial intelligence a foundation for building better software.
One way to say it. No limit to what we can build.
STUDIO HAZE Cut for clarity.
From vision to practice
- Principles How we design and develop Topaz
- Roadmap The development plan for putting this vision into practice
- Conformance Evidence for checking the specification and implementation
- History Changes delivered and releases shipped
- Built with Topaz A language tested in real products