Re:Show HN: Muon, a low-level programming language inspired ...
by gizmo on Sunday April 07, 2019 @04:36PM
(#19599677)
This looks promising. We haven't seen a lot of new languages lately that could turn into viable alternatives to C. Muon binaries don't seem to have a runtime or other dependencies so it looks like a module written in Muon can be statically linked into an existing C/C++ project. Pretty cool.
[ Parent
| on HN ]
Re:Show HN: Muon, a low-level programming language inspired ...
by nickmqb on Sunday April 07, 2019 @04:53PM
(#19599795)
Yes, one of the goals for Muon is to make it easy to use Muon code from another language.
There's a recent wave of new languages in the same spirit as Muon, like Zig, Kit, Jai and V (the last two have not yet been released). But since they all have no/minimal runtime, it should be relatively easy to reuse libraries between them.
Re:Show HN: Muon, a low-level programming language inspired ...
by vedantroy on Sunday April 07, 2019 @05:16PM
(#19599931)
I noticed Rust was not your list of languages. Is Rust fundamentally different then these languages? If so, why?
Re:Show HN: Muon, a low-level programming language inspired ...
by IshKebab on Sunday April 07, 2019 @06:15PM
(#19600294)
Rust aims for (mostly) memory safely which none of the others do. As a result it is way more complicated and rather different from them.
Re:Show HN: Muon, a low-level programming language inspired ...
by nickmqb on Sunday April 07, 2019 @05:51PM
(#19600146)
Ah, good question. Rust could definitely be in that list as well! It's a more mature language (so that's why I didn't mention it in the list), but conceptually it very much fits.
Re:Show HN: Muon, a low-level programming language inspired ...
by e12e on Sunday April 07, 2019 @06:58PM
(#19600492)
Seeing the original list, my guess was that it was no gc, with a small runtime - and the immediate question then was - how is this different/better than "D as a better C"?
Re:Show HN: Muon, a low-level programming language inspired ...
by nickmqb on Sunday April 07, 2019 @08:29PM
(#19600940)
The main difference is simplicity. D has a lof of features, like classes, inheritance, exceptions, properties, etc. Muon is a much simpler language that specifically avoids all of those things.
Re:Show HN: Muon, a low-level programming language inspired ...
by Gibbon1 on Sunday April 07, 2019 @05:23PM
(#19599978)
I think that is a very good design choice. Failing at that was one of the big catastrophes with C++.
Re:Show HN: Muon, a low-level programming language inspired ...
by xixixao on Sunday April 07, 2019 @04:47PM
(#19599750)
Have you seen Nim?
Re:Show HN: Muon, a low-level programming language inspired ...
by azhenley on Sunday April 07, 2019 @04:56PM
(#19599815)
I second taking a look at Nim: https://nim-lang.org/
Some people will argue it isn't a contender for C though since it defaults to using garbage collection.
Re:Show HN: Muon, a low-level programming language inspired ...
by lasagnaphil on Monday April 08, 2019 @05:34AM
(#19603611)
But you can turn off the GC and use it as a ‘better C’ (Nim supports raw pointers by the way.) Although you have to ditch most of Nim’s standard library, you can still import C libraries, including libc (I’ve heard you can also do this for the D language.)
Re:Show HN: Muon, a low-level programming language inspired ...
by nimmer on Monday April 08, 2019 @06:27AM
(#19603839)
Only part of the stdlib depends on GC. Also the GC runs independently in each thread and can work with deadlines, making it harmless in most use-cases.
Re:Show HN: Muon, a low-level programming language inspired ...
by gizmo on Sunday April 07, 2019 @04:54PM
(#19599798)
I've used it for some hobby projects a year or two ago. Unfortunately the compiler was very unstable back then and linking Nim into existing projects turned out to be pretty painful, in part because of the gc/threading model.
There is a lot to like about Nim, but I think it tries to do too much.