The repository
Everything about SG is kept in the open in one repository: the design, the code, the measurements and the background reading behind them.
The folders
| Folder | What it holds |
|---|---|
| design | The language itself, on paper, and every choice made while building it, slice by slice |
| interpreter | The code, in Rust: checker, interpreter, C back end, tests, and the programs measured against C; its documents |
| benchmarks | The measurements: SG against C, Rust and Zig, where it is still slower, and how it is measured |
| trials | Programs people write (grep, wc, ...) and the modules of the library in SG, Rust and Zig, measured against each other |
| topics | Background: essays on C, Rust, Zig and Go, and on the problem SG sets out to solve |
| sources | Reading list: books, Hylo, Vale, Rust writings, tools |
| website | This site, built with Docusaurus |
| editors | The extension for VS Code, which runs sg lsp |
| brand | The logo, its icons and how they are made; Pasha, the mascot, and Pasha's badge |
The design documents
If you read one, read decisions and open questions: the idea of the language, the principle every decision follows, and the way to the rest, every decision by topic with its reason and its cost, what is still open, and what comes next. The others:
| Document | What it holds |
|---|---|
| Decisions by topic | The rules of the language, each with its reason, one page for each part |
| Example programs | Twelve programs written before there was a compiler, and the questions they raised |
| From Rust to SG | What a Rust programmer writes and what SG writes for it, with how far each line is built |
| Syntax draft | The ownership notation, and the earlier drafts that were dropped |
| Memory model | The first model (generation-checked pointers), kept for the record; it was dropped |
| Roadmap | Where to start when designing a language, the steps and the traps |
The background essays
Best read in order:
| Essay | What it holds |
|---|---|
| C and manual memory | Why memory management was left to the developer |
| History of Rust ownership | The roots of the idea, why it took 40 years, why C++ could not do it |
| Zig | Where it stands on safety, how long the move from C takes |
| Rust syntax and C# | Where the noise comes from, the "second C++?" question |
| Go | Its philosophy, its weak sides |
| Safe C attempts | From Cyclone to C3, the layers of pointer safety |
| Use-after-free | The explicit error idea, why a simple table is not enough |