News for hackers. Stuff that matters.
Re:Ask HN: Next programming language to learn: Nim vs. D? by sdhgaiojfsa on Thursday June 14, 2018 @05:46PM (#17315692)
Need more data to compute a meaningful answer. What do you want our of your next language?
Re:Ask HN: Next programming language to learn: Nim vs. D? by crypto-jeronimo on Thursday June 14, 2018 @05:53PM (#17315753)
I'm looking for a well-rounded language, which is versatile in the same direction as, e.g., Python is. Ideally, it would also enable expanding one's own set of programming skills and knowledge/practice of interesting paradigms (i.e., a mind-shift of sorts).

Nice to have's: - a rich library ecosystem (like Python and Go, for instance) - as close to C as possible, in terms of speed

Re:Ask HN: Next programming language to learn: Nim vs. D? by karmakaze on Thursday June 14, 2018 @06:51PM (#17316098)
I've been looking for something similar to Python and Go as well. I can never seem to get the performance from Python that the great libraries do. Go is great for simple types but I haven't quite got good patterns for larger projects and run into performance issues with channels. Pony is where my current search and learning is at. I'll queue up Nim as another possibility.
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.
Re:Ask HN: Next programming language to learn: Nim vs. D? by sam0x17 on Thursday June 14, 2018 @06:07PM (#17315871)
You definitely are looking for crystal language https://crystal-lang.org/