r/ProgrammingLanguages • u/isuckatcs_was_taken • Sep 15 '26
Language announcement How to Compile Your Language - An introduction to language design through building a compiler frontend on top of LLVM
Recently I extended an educational compiler project I started two years ago.
The goal is to bring together several major features found in production languages into Your Language, a small programming language, and explain how to implement them in its compiler.
Your Language currently supports:
- Native code generation with LLVM
- Hindley–Milner type inference
- Traits and type extensions
- Tracing garbage collection
- Heap-allocated closures
- Monomorphized generics
- Dynamic dispatch
- Data-flow analysis
- Compile-time expression evaluation
The implementation is now finished, but the accompanying guide is still a work in progress.
If you're interested, you can find the project here:
59
Upvotes
16
u/isuckatcs_was_taken Sep 15 '26
Per AutoModerator's request I hereby confirm that this project did not use an LLM as part of the development process.
8
u/memememe_1234 Sep 15 '26
The large number of emojis in the README makes this look LLM generated
2
u/vmcrash Sep 16 '26
I can't find a detailed explanation of Hindley–Milner type inference. Am I missing something?
3
u/Comic_Melon Sep 16 '26
Readme looks AI as hell
1
u/vinipsmaker Sep 22 '26
Looking forward to the next chapters on your series. Thank you for taking the effort for creating this.
-2
u/AryanPandey Sep 15 '26
Y