Hey there, Bas here, Mun core developer.
Its great to see people checking out Mun! It’s still very early days but we are very excited about what we think it can become.
Do you mean that there is no need to type return
at the end of a function? I think this is a matter of taste really. Mun is very much inspired by Rust syntax where this is the default. Formatting standards of Rust also encourage you to remove the return
if its the last statement in the function. Personally, coming from C++, it took me some time to get used to this but now I find it a lot nicer and I accidentally do it in C++ too.
Me too! I think they are not required. Mun actually also doesn’t require them. But please read this github issue about what can happen if you don’t use them.
This is also something taken from the Rust syntax. I am thinking about adopting the same behavior as Zig where const
has a different meaning from let
(const means compile time evaluated).
I think this also depends on where you are coming from. As a long time Lua developer I wholeheartedly agree but in the world of Rust this makes a lot of sense if you want to change the type of a variable (for example to unpack a Result
or Option
). Having types also makes this a lot less insecure.
I can totally understand that. At Abbey Games, where I worked for a long time, we used Lua very extensively and we ran into a lot of issues with Lua not having types. This is a really great experience for artists and designers that quickly want to get something up and running. However, if systems become bigger and bigger, not having static type information significantly reduces the ability to refactor which led to people just adding patches upon patches. I wrote about that situation in more detail and why I chose to explore Mun here.
Thats a very interesting aproach as well! Early on I played a lot with creating a language that was a superset of Lua (like what Typescript is for Javascript) to see if I could add support for our usecase that way. However, the more I delved into it the more I realized I could also compile that language to LLVM IR and get even more performance. Thats basically how we got to Mun.
Thanks again for check Mun out! Like I said, its all in a very early stage but if I can answer any questions, please let me know! We do realize that developing a language ourselves is insane. We can really use all the help we can get. Either by contributors or people just taking a look.