Nice to have's: - a rich library ecosystem (like Python and Go, for instance) - as close to C as possible, in terms of speed
Nice to have's: - a rich library ecosystem (like Python and Go, for instance) - as close to C as possible, in terms of speed
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++.
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...
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.