For me, the pythonic syntax was what made me not want to try it. Of course it's personal preference, but I can't stand anything that uses the indentation level to structure code. I love my curly braces and formatting tools. I imagine I'm not alone in this, so there goes a chunk of people.
Ask HN: Why did Nim not catch on like Rust did?
11–20 of 139 posts
Re: Ask HN: Why did Nim not catch on like Rust did?
#12For me, the pythonic syntax was what made me not want to try it. Of course it's personal preference, but I can't stand anything that uses the indentation level to structure code. I love my curly braces and formatting tools. I imagine I'm not alone in this, so there goes a chunk of people.
There is possibly another argument to be made, that Nim is not close enough to Python. Look at how people have gravitated towards Mojo and it being a superset. Therefore, Nim could be argued as kind of trapped in a no man's land, where not of the C family and not close enough to Python to be an easy enough switch over nor strong enough to gain mass appeal with its own identity.
Re: Ask HN: Why did Nim not catch on like Rust did?
#13But Nim has a pretty solid standard library with clearly written code and an awesome community to help with problems. I generally read a lot of standard library code to expand my knowledge of language and discover common patterns which repeat themselves in a lot of real world problems.
C inter-op is really first class, and as far as i know it has one of best C++ inter-op as well, you can take a look at: https://github.com/jmgomez/NimForUE for a real world example.
I use Nim for my work in both professional and personal capacity and also have written about some of it at https://ramanlabs.in/static/blog/index.html
Re: Ask HN: Why did Nim not catch on like Rust did?
#14Rust has the elevator pitch down: C but memory safe. "very exciting features such as macro support, pythonic syntax, transpiles to C/C++/JavaScript, no VM, systems programming language, suitable for hard real-time systems etc" is not a good elevator pitch. Its a little bit of everything with no clear focus point. So I'd say rust had better marketing.
At least it's the reason I tried it once.
It was not a bad experience.
Re: Ask HN: Why did Nim not catch on like Rust did?
#15It's the same with Julia, yes it was clear who it was trying to replace, but it wasn't 10x better.
Re: Ask HN: Why did Nim not catch on like Rust did?
#16For me, the pythonic syntax was what made me not want to try it. Of course it's personal preference, but I can't stand anything that uses the indentation level to structure code. I love my curly braces and formatting tools. I imagine I'm not alone in this, so there goes a chunk of people.
Re: Ask HN: Why did Nim not catch on like Rust did?
#17Rust has the elevator pitch down: C but memory safe. "very exciting features such as macro support, pythonic syntax, transpiles to C/C++/JavaScript, no VM, systems programming language, suitable for hard real-time systems etc" is not a good elevator pitch. Its a little bit of everything with no clear focus point. So I'd say rust had better marketing.
Re: Ask HN: Why did Nim not catch on like Rust did?
#18Also, concurrency is very confusing in Nim. Channels require copying, so you start to look elsewhere. Regular stuff like thread pools and async fit together in confusing ways and it's easy to create multithreaded code that compiles but does not work. It's common to look into a nim "web framework" and have no idea how concurrency works in the framework from the docs or the code. There is one nim HTTP library that does, but I don't think it's very popular.
Re: Ask HN: Why did Nim not catch on like Rust did?
#19Nim isn't really known for anything other than being a good general-purpose language. In that sense, it's sorta like Haxe lang.
Other popular languages are T- or M-shaped generalists -- i.e. good enough as a general purpose language but also excelling at 1-3 specialties. You can use these languages for anything but in practice you use them in specific contexts.
* If you're working on a game in Unity3D, you're almost certainly using C#.
* If you're working on ML stuff using Jupyter notebooks, you likely use Python w Pandas etc.
* If you're doing big data processing with Hadoop then it's likely Scala w Spark.
* If you want a very high concurrency messaging backend, then Elixir or Erlang on OTP/BEAM is a good choice.
* If you're making a native iOS app, you don't have to use Swift but you probably will. Same with Kotlin for native Android. If you decide on Flutter instead of native mobile, then you'll use Dart.
However, my boss is never going to make me use Nim, because there aren't any particular use-cases where Nim is known as The Language To Use For That Situation. AFAIK Nim isn't known for any particular libs/frameworks/tools like Django, Rails, numpy/scipy/pandas, PyTorch, Hadoop, OTP, etc.
(full disclosure: I had a hard time finding a good language to replace my Bash scripts and settled on Nimscript, https://news.ycombinator.com/item?id=35756090)
Also *Timing*
Nim came out right after a number of other well-known languages caught on. There are too many other decent and popular languages to choose from. I like Nim, but not a single one of my programmer friends or acquaintances uses it. Whenever I mention it, the reaction is like: "Better to stick with a proven language I know (usually Go/Python/Ruby/Java)" / "Is that like Zig?" / "I'd rather learn Haskell, Rust, or a dependently typed language."
And finally...
I think Mojo is going to hurt Nim adoption.