Micron is a systems programming language and toolchain intended as a practical alternative to C. It combines Oberon’s modularity, strictness, and simple syntax with C-like low-level capabilities, aiming to support hardware initialization, drivers, kernels, and applications in one language. Rather than relying on a preprocessor, it provides generics, inlining, and compile-time procedures, and it can call C directly without wrappers. Its defining feature is a set of language levels: modules can restrict themselves to basic or stack-free code, while higher levels add facilities such as heaps, pointers, exceptions, dynamic dispatch, and garbage collection. Modules can depend only on others at the same or a lower level, helping keep constrained systems code independent of heavyweight features.
The project includes a compiler, interpreter, IDE, language specification, textbook, examples, and prebuilt Linux tools. Sample programs show low-level bit operations and pointer arithmetic, direct C library calls, and structural interfaces that let unrelated record types share an API without object-oriented inheritance; generic programming is also supported. The repository describes roughly 130,000 lines of migrated working code, including a Smalltalk-80 implementation, a Pascal compiler, a Scheme virtual machine, and versions of Project Oberon. Its Micron System ports Project Oberon to RISC-V and boots in an emulator, with a textbook explaining the build and boot process. Raspberry Pi Zero 2 support is still being developed.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.