3 ms·
Nim is also a strong player as a systems programming language. In terms of memory management, it's configurable, and by default you get ARC (no GC). I've writte
by khaledh 3y ago
Nim is also a strong player as a systems programming language. In terms of memory management, it's configurable, and by default you get ARC (no GC). I've written a hobby kernel (if you can call it that) in Nim[1] as well as Zig[2], and I found Nim to be much more ergonomic and approachable. The fact that Zig requires weaving an allocator through most calls that may allocate gets in the way of what I'm trying to do. I'd rather focus on core logic and have ref counting take care of dropping memory when appropriate.
One thing I wish Nim had though is true sum types with payloads. I think there's an RFC for that, but it's a shame it's not in the language yet.
[1] https://github.com/khaledh/axiom https://github.com/khaledh/axiom
[2] https://github.com/khaledh/axiom-zig https://github.com/khaledh/axiom-zig
- loctal 3y agoGleam is another strong candidate too
- lokelow 3y agoGleam runs on the Erlang VM, and I believe it also compiles to WASM. That's pretty different than the other languages here. Cool language though, I am a big fan of the BEAM
- throwawaymaths 3y ago> The fact that Zig requires weaving an allocator through most calls It does no such thing. Why didn't you just make a global allocator? Alternatively, you can have your allocator be attached to your objects.