In what cases is Nim a better option than Rust? Would be great if anyone with more experience can share more information.
I think the main difference (benefit?) is that Nim has the convenience of a garbage collected language while retaining good and predictable performance (e.g. via ARC/ORC and thread-local GC). Rust has no GC so requires more from the programmer. Personally, I'd rather use a GC language to have less complexity in the code even though I have to spend some more time learning to use the GC correctly.
Nim in 2020: A Short Recap
41–50 of 121 posts
Re: Nim in 2020: A Short Recap
#42Earlier quoted context omitted.
Nim looks Pytonish (and has some Python-inspired syntax), but it is very much NOT Python. People coming from Python that expect a "compiled, faster" Python often find a compiled, faster language but have very weird concepts expecting that language to behave like Python though it isn't.
When I started learning Nim, I did not really expect anything, but time and again I caught myself thinking, ‘This is so much like Python!’ Eventually I lost interest because I do not need a faster Python that is not Python, and I didn’t find much else to be enthusiastic about.
Nim took some inspiration from Python's syntax, but the similarity is only skin deep. The construct of the language is very, very different resulting in code that usually looks and is structured differently.
IMO going into Nim thinking it will be like Python but compiled! and faster! with types! is not a good way to approach it. It is an entirely different language altogether.
Re: Nim in 2020: A Short Recap
#43Too bad nim uses a whitespace-sensitive syntax like python, something I personally dislike.
Re: Nim in 2020: A Short Recap
#44In what cases is Nim a better option than Rust? Would be great if anyone with more experience can share more information.
Re: Nim in 2020: A Short Recap
#45Earlier quoted context omitted.
When I started learning Nim, I did not really expect anything, but time and again I caught myself thinking, ‘This is so much like Python!’ Eventually I lost interest because I do not need a faster Python that is not Python, and I didn’t find much else to be enthusiastic about.
I've written a large-ish amount of Nim code on personal projects while using Python day to day at work, and almost every time I'm working with Nim my brain is screaming at me at how unlike Python it is. Nim took some inspiration from Python's syntax, but the similarity is only skin deep. The construct of the language is very, very different resulting in code that usually looks and is structured differently. IMO going…
Are there ways in which Nim nudges you to structure your code in better ways than you would in Python? Are there footguns?
Re: Nim in 2020: A Short Recap
#46Too bad nim uses a whitespace-sensitive syntax like python, something I personally dislike.
I often find myself wondering why other languages haven't implemented support for an alternative syntax. I suspect the answer is that simply no one cares enough to put the work in, but perhaps there is a better reason.
¹ https://en.m.wikipedia.org/wiki/Vala_programming_language
² https://en.m.wikipedia.org/wiki/Genie_(programming_language)
Re: Nim in 2020: A Short Recap
#47Earlier quoted context omitted.
I think the main difference (benefit?) is that Nim has the convenience of a garbage collected language while retaining good and predictable performance (e.g. via ARC/ORC and thread-local GC). Rust has no GC so requires more from the programmer. Personally, I'd rather use a GC language to have less complexity in the code even though I have to spend some more time learning to use the GC correctly.
For normal purposes, dealing with Rust's lifetimes will be easier than spending some time "learning to use the GC correctly"
Re: Nim in 2020: A Short Recap
#48Earlier quoted context omitted.
When I started learning Nim, I did not really expect anything, but time and again I caught myself thinking, ‘This is so much like Python!’ Eventually I lost interest because I do not need a faster Python that is not Python, and I didn’t find much else to be enthusiastic about.
I've written a large-ish amount of Nim code on personal projects while using Python day to day at work, and almost every time I'm working with Nim my brain is screaming at me at how unlike Python it is. Nim took some inspiration from Python's syntax, but the similarity is only skin deep. The construct of the language is very, very different resulting in code that usually looks and is structured differently. IMO going…
Re: Nim in 2020: A Short Recap
#49Earlier quoted context omitted.
I think the main difference (benefit?) is that Nim has the convenience of a garbage collected language while retaining good and predictable performance (e.g. via ARC/ORC and thread-local GC). Rust has no GC so requires more from the programmer. Personally, I'd rather use a GC language to have less complexity in the code even though I have to spend some more time learning to use the GC correctly.
For normal purposes, dealing with Rust's lifetimes will be easier than spending some time "learning to use the GC correctly"
Re: Nim in 2020: A Short Recap
#50Earlier quoted context omitted.
I consider Nim to be a compiled, faster Python. Nim is very easy to read and understand, and prototype in, vs. Rust.
Nim looks Pytonish (and has some Python-inspired syntax), but it is very much NOT Python. People coming from Python that expect a "compiled, faster" Python often find a compiled, faster language but have very weird concepts expecting that language to behave like Python though it isn't.
> very weird concepts
I'm curious, what weird concepts are you referring to?