Hacker News new | ask | show | jobs
by sp33der89 1702 days ago
Nim is the most readable language I've ever seen. I've dabbled with Go, but Nim is almost like pseudocodes+types. Highly recommend you take a look and try it out! You can use libraries like https://github.com/planety/prologue or https://github.com/treeform/pixie to create something quickly and fun(compile times are faaasst!).

And Nim does not have a mandatory GC, you can go as low-level as you want, but in case you don't want that you can choose from several great GC's(a capable soft real-time GC and Boehm for example). Or you could combine the best of both worlds and take a look at the shiny fancy ARC/ORC deterministic memory management: https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc...

1 comments

Looks like you know a bit of Nim. Apart from ecosystem and IDE what are the some of the disadvantages of Nim compared to Go?
* Goroutines are probably a lot more easier to use. Work is being done to make Nim even better in that area: https://github.com/nim-works/cps but don't expect it soonish.

* I feel like Go has less 'edge cases', but the Nim compiler is steadily getting more stable, especially consider it's not backed up by a major company!

* Metaprogramming is really powerful, but not beginner friendly. The documentation says use macros when necessary, but personally I don't think that really happens in practice.

The advantages by far outweigh the disadvantages, especially if you are looking for a clean Go alternative(except maaaaaaybeee web application).

EDIT: my own wishlist, but they aren't relevant compared to Go:

* Better sum types * Builtin pattern matching

I have not done a lot of Go, but I'm pretty sure Nim's concurrency story isn't up there with go, at least not yet.

Nim has other advantages, including great Interop with C or C++ as it compiles to these languages and allows low level, unsafe features like raw pointers when needed.