3 ms·
Thanks for the kind words! Correct, the initial compiler is built using the C# interpreter; the compiler can then be used to compile the next version of itself
by nickmqb 8y ago
Thanks for the kind words!
Correct, the initial compiler is built using the C# interpreter; the compiler can then be used to compile the next version of itself. Bugs and backwards incompatible language changes can be a problem though. For that reason, it's a good idea to keep the C# interpreter updated so there's always a safe path to bootstrap from.
Variable redeclarations may be useful in certain scenarios, e.g. redeclaring a variable of type Maybe<T> as T. You're right that serialization may be better implemented as a library using some kind of reflection capability, this needs some more thought. I haven't yet thought about the specifics of build tools, but I very much want to make it easy for people to write tools, and offering the compiler as a library will be part of that.
I started with the initial idea for Muon late 2017/early 2018. Initially, the plan was to create a higher level language (more like C#), but the more I iterated the more I realized that low-level was the way to go. Muon is my first large language project, though I've always been interested in compilers and have written some toy languages in the past.