Skip to content
NorscodeNorscode

A language that builds itself

ArticleBy the Norscode project

Norscode is self-hosting — the compiler is written in the language it compiles. It's the strictest test.

The language builds itself bootstrap binary small start compiler written in Norscode builds itself

The compiler that turns Norscode code into something the machine can run is itself written in Norscode. It sounds almost circular — how can a language compile itself before it exists? The answer is a small bootstrap binary that gets the ball rolling, and after that the language builds itself.

The strictest test

A compiler is one of the most demanding programs you can write. It's full of text processing, large data structures, tangled logic and no room for ambiguity — one error in one place, and everything else goes wrong. If a language can express its own compiler in a readable way, it has passed a test most programs never come close to.

A practical benefit

It also means there isn't another language hidden underneath. Whoever knows Norscode can read the toolchain — the compiler, the linker, the standard library — without having to learn a foreign system first. There's no extra threshold between you and how your code is actually run.

Trust through openness

When the whole way from source code to running program is written in one language you can read, there are fewer black boxes to trust blindly. You can follow the trail yourself. Self-hosting isn't a stunt for bragging; it's a way of making the system transparent.

A language that builds itself says something about being finished enough to be taken seriously — and that no part of it is withheld from scrutiny.

What it means for you as a user

You don't need to care about bootstrapping to benefit from Norscode being self-hosting. The practical benefit is trust: the whole way from the code you write to the program that runs is written in one language you can read. There's no foreign toolchain in another language between you and what actually happens. If you want to understand how something works, you can open the source and follow the trail yourself.

Fewer black boxes

In most systems there are links you just have to trust without being able to check them — a compiler written in something else, a runtime you can't see into. When the compiler, the runtime and the standard library are all written in the same readable language, the list of things you have to take on faith shrinks. Openness isn't just a principle here; it's a property of how the system is built.

A sign that it holds up

That a language can express its own compiler is also a claim of maturity. A compiler is large and tangled and tolerates no ambiguity; if the language handles it, it handles most things. Self-hosting is therefore not bragging for its own sake — it's both proof that the tool holds up, and a way of making the whole way transparent.

Related

Back to the overview