Couple of reasons why I think Nim is an awesome language:
1. Syntax: It's beautiful. If you like Python syntax, you'll like this. On the other hand, it's much more concise, without losing readability.
2. Static type check, with a sprinkle of type inference only when assigning the initial value.
3. Proc/operator overloading: Have procedures (functions) named the same handle different data types differently. And the same with operators.
4. Support: Great support over Gitter, GitHub issues, Nim Forum, etc. Great devs! (though, I incorrectly thought earlier that that wasn't the case :))
5. Makes me feel home: Hacking/coding in Nim comes the closest to coding in Emacs Lisp. In Emacs, if I want to understand what a function does, I look at its source code. I can do the same in Nim.
6. Editor support: The nim-mode Emacs major mode and ob-nim Org Babel package are awesome!
7. Documentation: Check out the Nim the index.html to search anything, and also Devdocs.
8. Whitespace: Tab not allowed, yay!
9. Not as easy as installing go/rust toolchains locally (without admin rights), but not difficult either.
10. The nimble tool (equivalent of pip) works great for building/distributing Nim projects.
.. and much more! Computer science experts can talk about more benefits of Nim from systems programming point of view (GC, etc.).
For my use case, where I use Nim as Python/Bash replacement, CLI utility development, it looks excellent so far.
In plain terms, it's joy coding in Nim :)
(After trying both, I went with D. But in the future I want to use Zig for some of the lowest level code.)
When I left Nim, it was because I had serious concerns about the project being able to tame its rapid accumulation of features. I had no faith in all the things it advertised to actually work correctly. The dev process I witnessed was "cave in to toxic people who whinged a lot." D has a lot of warts from being around longer, but in the end, what I want to write code in anger with is something that can boast a well-engineered compiler, and D has not one compiler but more than one.
That was years ago. To win me back you'll have to market a demonstration of similar stability.
Zig is in a different category from any other option because its design allows me to tackle a piece of low-hanging fruit: a modernization of old C libraries that does not reinvent the universe, create a new ABI, introduce a runtime, or otherwise disrupt the original context. I can write basically the same kind of code in the same kind of style, but the language automatically pushes my attention to more edge cases and undefined conditions, and the compiler simplifies the build process, removing the preprocessor noise that tends to appear in substantial libraries.
Yes, that's one of my main motivations. I'm comfortable enough with Python, Java (comfortable doesn't mean I enjoy this one) and C.
> Do you have projects in mind?
Yes, both are solely for the purpose of enrichment of my current set of skills and knowledge: - Source control system that is a "lite" version of git. - A bit torrent client.
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.
Here are some recent Chapel performance results:
shared memory: https://twitter.com/ChapelLanguage/status/100266735892881408...
distributed memory: https://twitter.com/ChapelLanguage/status/100258998583959552...