r/Compilers • u/axlrosefan31 • May 13 '26
Code layout, Compiler inspiration
I've been developing my own compiler in C++ (LLVM based) for a month and the codebase turned into a mess. 500+ loc files, big functions and other garbage. I'm trying to find hobby compilers for inspiration. I've checked github but they're mostly very simple toy languages.
Here's my own compiler: https://github.com/budchirp/zep-lang
The syntax is very much inspired by rust, kotlin, swift and C++.
I like C++ but I hate its stdlib, headers and module management. The inspiration behind the language was making a better C++.
Can y'all roast my compiler and send your own compilers?
View all comments
Show parent comment
1
u/axlrosefan31 May 14 '26
I'm creating this language because its my dream language and for becoming a better compiler dev. The problem other langauges have is just my own preferences. I don't like borrow checker of rust, gc and syntax of go, allocators and syntax of zig and module management / stdlib of c++. The most important feature for me is the support of generics and oop. My language has module management builtin (zig, rust and go has but not c++), destructors (c++ only), defer blocks (zig and go only), generics (rust and c++ only). My language combines (will combine) all of the sweet features of other languages for me.