3 ms·
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 de
by 3rdAccount 8y ago
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++.
- honewatson 8y agoApart 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#linux-arch-linux-x64-intel-core-i7-4710hq-cpu-1 https://github.com/frol/completely-unscientific-benchmarks#l...
- nimmer 8y ago> 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.
- 3rdAccount 8y agoThank 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.