By replacing the heavyweight Delphi-style OOP with a much simpler method/interface model inspired by Go, I have written an extremely compact (~10000 lines) self-hosting Pascal compiler for Windows. It can be viewed as an implementation of Russ Cox's thought:
"If I could export one feature of Go into other languages, it would be interfaces."
The compiler directly emits native x86 code and doesn't require any external assembler or linker. It can be easily embedded into larger software systems and used for educational purposes, e.g., as a playground for language design amateurs.
Integration with the Raylib 2D/3D game development library has become the first sign of maturity for my compiler.
maze_copy.jpg
Bookmarks