Making your own programming language is easier than you think (but also harder)
2 days ago
- #compiler-development
- #modding
- #programming-language-design
- The author began developing their own programming language, pslang, in mid-December, motivated by three converging ideas and a desire for a modding-friendly language.
- Key language features include indentation-based scoping, 13 primitive types (bool, integers, floats, unit), arrays as first-class types, function types, pointers, and structs, with a focus on C interop and predictable memory layout.
- The implementation involves libraries for types, AST, parser, IR, interpreter, and JIT compiler, with a current focus on Aarch64 Mac support and plans for optimizations, modules, and a standard library.
- Future considerations include adding generics, operator overloading, resource management, compile-time evaluation, and async/await, while prioritizing the game project over the language.