This project is a programming language with an accompanying compiler intended to replace C for my personal projects. The language itself takes heavy inspiration from Odin and Jai, while the compiler uses an approach to type checking adapted from the Bitwise project.

GitHub repo: https://github.com/Soimn/mm

Background

The project started back in 2019 as metaprogramming tool for C, but quickly became its own language as I was too inexperienced with parsing at the time to attempt a standard complying C parser. From then on, the language accumulated a ton of complexity with the addition of weird language constructs and way too complex metaprogramming, with none of the features actually implemented. After not making any significant progress for 2 years, I opted to scrap everything and instead of making a “cool new language with all the features”, make a simple C like language with as few pitfalls as possible.

Why not C?

Most of my problems with C are due to in-order declarations, lack of introspection, differences between compilers and way too much undefined behaviour. In my opinion C is still perfectly usable. However, every time I find a quirk with any of the compilers, run into a hard to find bug or end up writing ugly hacks to circumvent either problems with the language or compiler, I grow more frustrated.

Why not Odin?

After trying out Odin for Advent of Code 2020 and later writing a port of visual6502 in the language, I have considered dropping the project and switching to Odin. However, the language has deviated too much from my preferences lately. Most of my problems with Odin are small and largely insignificant, but when added up they result in more friction than I would like.