Show HN: Muon, a low-level programming language inspired by C, C# and Go
I have a criticism regarding how basic data types are named:
<a href="https:&#x2F;&#x2F;github.com&#x2F;nickmqb&#x2F;muon&#x2F;blob&#x2F;master&#x2F;docs&#x2F;muon_by_example.md#core-types" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nickmqb&#x2F;muon&#x2F;blob&#x2F;master&#x2F;docs&#x2F;muon_by_exa...</a><p>Type names like long, short, char (and the oh-so-dear long long) are ancient cruft which shouldn&#x27;t be used in a new programming language. They are confusing (as in, the answer to question: how many bits are there in your int, long, short depends on both arch and compiler) and since 70s we discovered it the hard way that they&#x27;re non-extensible (multiple times, actually!). Similar for the fate of char in the post-ASCII world. C still keeps them for backward compatibility, but types like uint32_t defined in stdint.h is becoming common practice for new code.<p>The choices are also not compatible with C or Go, adding further to the confusion (Muon&#x27;s int is 32-bit and long is 64-bit on all archs!), so even for C&#x2F;C++ and Go programmers, the nostalgia turns into a pitfall. Having no familiarity with C# (not much of a Windows user since late-90s, and C# virtually doesn&#x27;t exist for Linux&#x2F;macOS people which Muon claims to be targeting), I looked it up, and it seems it&#x27;s based on C#&#x27;s distorted and incompatible adoption of C89&#x27;s data types.<p>Go applies the same custom to float&#x2F;double as float32&#x2F;float64 which makes it uniform. Go also defines int to be the size of the native integer register size on the target arch (which I like because this is what int supposed to mean originally, this was the common understanding when porting between C and assembly, although some may disagree after ~50 years of weird adaptations of it) which unifies uint and size_t, rendering size_t obsolete.<p>Ironically, Muon makes use of explicit number-of-bits suffix for one data type: bool32 (and there&#x27;s no bool16 or bool64). I don&#x27;t even know why one might have it as a basic language type.<p>I really hope he adopts a naming convention that is similar to  C99&#x27;s stdint.h or Go (which the author claims to be inspired by), or their shorter cousins u8, u16, ... used in Linux source code.