I went over this in other comments, but basically the language appeals to me since:
- it's close to Python in syntax (less noise, more readable)
- has no garbage collector by default (it uses ARC)
- has great C interop
- can be optimized through the C backend compiler
- can target bare-metal with minimal effort
- supports inline assembly
- has great template/macro system (I do use templates, but I haven't had the need for macros yet)
There's probably other reasons, but those are the ones I could think of now. As for why not other languages, I think the only other languages suitable for this kind of work are: C, C++, Rust, and Zig. Here's my take on each:
- C: The mother of all system languages, but outdated with lots of UB gotchas
- C++: I don't like/need OOP, so why pay the prices of C++ complexity and manual memory management
- Rust: I find the language too complicated for my taste. I know it's subjective, but it just doesn't feel right for me. Also writing a kernel involves a lot of unsafe code anyway.
- Zig: I tried Zig and also found its syntax to be a bit too noisy. Also having to worry about allocators in most of the code distracts from the core logic I'm trying to focus on.
Nim is in part less popular because its BDFL,
- isn't concerned with Nim becoming a mega popular language; it's enough that it has a successful user base to justify the effort/jobs developing it
- believes that marketing is not required as people will choose Nim based off its superior features alone. (This is in large part true up-to people learning it exists, which is where marketing is valuable)
There are genuine shortcomings, of course. Every language has them.
It is something of a unicorn though. It's so pleasant to use at many levels of the stack from bare-metal to applications. People even use it for games.
I had to think hard about this, and I couldn't come up with something so obvious that it would be a no brainer to not use Nim.
__MatrixMan__ and SJMG have good points. If it's anything, it wouldn't be a technical issue in the language. It's like a Tesla when it first came out; it was obvious that EVs are the future, but they had less investment, less adoption, not enough charging stations, shorter range, and not a lot of certified shops for repairs. So naturally a lot of people held back until it became mainstream.
The issue is, will it become mainstream one day? Maybe, maybe not. But I'm betting on it myself.
If Nim went to the olympics, it would get a bronze or silver metal in five or six different areas, which is very impressive indeed. I think it's overlooked because gold is what draws attention.
If you wear enough hats to appreciate Nim in more than one of its dimensions, your attention is necessarily split enough to not evangelize so loudly for it in any one. People don't want practical, they want provocative.
Thanks. Agree on Rust. Liked zig at first but it seems they lost focus and started adding syntax sugar which just complicates things so I lost interest..