Live data from Hacker News

Pros and Cons of Nim

onlinetechinfo.com

21–30 of 86 posts

Re: Pros and Cons of Nim

#21
While I rather like nim as a language, there's a few more cons that need to be considered for any real use of the language:

- It has a bus/lottery factor of 1. The vast majority of all the changes were done by Araq and I have very little faith that the language would survive without him. This is even more pronounced with Zig (mentioned in comments here).

- It has had some very embarrassing bugs after the 1.0 milestone. Most of them were specific to Windows (e.g. [0]), which casts a lot of doubt on its cross-platform promise. Multiple times in the last year, when debugging a nim program, it turned out that the problem was in the language/standard library.

Now, these might not be reasons enough to not use nim, since it's a lovely language when it works, but a pro/con list should be honest.

[0]: https://github.com/nim-lang/Nim/issues/12315

Re: Pros and Cons of Nim

#22
post #4

Why use Nim over Go?

Some people prefer Nim because of small things like syntax. However Go is much more popular. I will do more research on this subject and see if I can list the differences in detail. However any such list could be soon made redundant when Go 2 comes out.

> small things like syntax

This is no small thing. The expressiveness of a language makes the difference between happy productivity and tedious typing and swearing.

Nim is in the same ballpark as Python here, while many other languages require a lot of boilerplate.

Re: Pros and Cons of Nim

#24

Why use Nim over Go?

Nim seems to be almost the anti-Go. While Go is all about simplicity and "less is more" [0], Nim's list of features [1] is huge.

Therefore, I think the two languages appeal to different sets of people.

[0] https://commandcenter.blogspot.com/2012/06/less-is-exponenti...

[1] https://nim-lang.org/docs/manual.html

Re: Pros and Cons of Nim

#26
I'm a big fan of Nim, but I really wish it supported cyclic type declarations in separate files and out-of-order functions without forward declarations. As it is, I'm constantly structuring things around those limitations. Big projects often end up squeezed into a single huge file (or a few huge files).

Re: Pros and Cons of Nim

#27
It occurs to me that the although they were aimed at different uses cases the language that's actually closest to Nim today is Julia. Python-like syntax, compiled to native code, significant meta-programming capabilities, some native support for concurrency. The biggest difference seems to be the approach to types, since Julia is a dynamically typed language (with optional type annotations) and Nim is statically typed, but Julia's type systems is powerful enough that in practice the difference may not be so big.

Anyone out there who has used both and has more observations?

Re: Pros and Cons of Nim

#28

What is the current state of REPLs for Nim? If I remember correctly, Nim had an official REPL a long time ago, but it was abandoned a few years back.

inim [0], which already works pretty good, recently got an enthusiastic new maintainer, so things are good and improving.

[0]: https://github.com/inim-repl/INim

Re: Pros and Cons of Nim

#29

What is the current state of REPLs for Nim? If I remember correctly, Nim had an official REPL a long time ago, but it was abandoned a few years back.

There is one bundled with a standard nim installation, and I use it regularly (when working in nim). It works, but it's not very good.

I expect the developers to know this, since its accessible only though the `$ nim secret` command.

Post reply on HN