VTereshkov
27-03-2020, 02:47 PM
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 (https://github.com/vtereshkov/xdpw) 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 (https://github.com/vtereshkov/raylib-xdpw) with the Raylib (https://www.raylib.com/) 2D/3D game development library has become the first sign of maturity for my compiler.
1549
"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 (https://github.com/vtereshkov/raylib-xdpw) with the Raylib (https://www.raylib.com/) 2D/3D game development library has become the first sign of maturity for my compiler.
1549