|
|
|
|
|
by honewatson
2924 days 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. 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.