News for hackers. Stuff that matters.
Re:Ask HN: Next programming language to learn: Nim vs. D? by 3rdAccount on Thursday June 14, 2018 @06:38PM (#17316029)
Nim is like a fast version of Python and Crystal is like a fast version of Ruby. Rust and Go also have some use in the same space, but they all differ in the details as in whether the GC exists and is enabled by default, is optional, or doesn't exist.

Coming from Python, I found Nim to be the best for my mild systems programming needs. I haven't tried Crystal as it doesn't work on Windows (last I checked). Go is too simple/verbose and doesn't have enough language constructs by design. Rust seems like it is changing too much and too low level. I really wanted to like D, but had trouble getting up to speed in it. I bet it's much easier if you come from C++.

Re:Ask HN: Next programming language to learn: Nim vs. D? by honewatson on Thursday June 14, 2018 @07:12PM (#17316186)
Apart from some syntactic commonalities and expressiveness, Nim doesn't have a lot in common with Python.

The idiomatic approach to solving problems in Python and Nim are different. I came from a strong Python background and now I prefer Nim to Python as a general purpose language and especially for writing scripts.

Nim is highly productive and with excellent type safety.

The compiler is relatively fast though maybe not as fast as D and certainly not as fast as Go. The compiler is a lot faster than Rust/Crystal/Pony and there is current work being done on incremental builds which should make it even faster.

If you take a look at these benchmarks the Nim and D fastest versions are faster than Rust and on par with the fastest C++.

Significantly, the fastest D version has double the lines of code as the fastest garbage collected version of Nim though the Nim version performs slightly faster.

The fastest garbage collected version of Nim has exactly the same lines of code as Python.

https://github.com/frol/completely-unscientific-benchmarks#l...

Re:Ask HN: Next programming language to learn: Nim vs. D? by nimmer on Friday June 15, 2018 @05:52AM (#17318605)
> Apart from some syntactic commonalities and expressiveness, Nim doesn't have a lot in common with Python. > The idiomatic approach to solving problems in Python and Nim are different

On a practical level, they are close enough to let you convert Python code to Nim with reformatting and replacing instead of doing a complete rewrite.

Re:Ask HN: Next programming language to learn: Nim vs. D? by 3rdAccount on Saturday June 16, 2018 @10:00AM (#17327426)
Thank you, this is what I meant when I said similar to Python. Someone with Python familiarity should have zero issues with writing a Nim program and will mostly feel comfortable with the syntax.