Live data from Hacker News

Ask HN: Why did Nim not catch on like Rust did?

news.ycombinator.com

61–70 of 139 posts

Re: Ask HN: Why did Nim not catch on like Rust did?

#61
Nim is too timid. Most languages are too timid.

My context: I'm a maintainer of iNim, creator of the Rust channel, No Boilerplate, and a professional python web developer for 15 years.

The features you are excited about in Nim are compromised for the sake of simplicity:

- Macros can't change syntax,

- There's a limit to how real-time the standard language is,

- Compiling to javascript is a nice trick, but if it didn't rely on GC it could compile to webassembly, which is better,

- Ask any advanced python developer: Indentation for syntax is a bad idea at scale. Hell, have you ever used YAML?

What Rust does is a revolution because they solved the problem of memory safety without garbage collection with the Borrow Checker. The knock-on effects are GARGANTUAN.

This was a hard problem to solve, and it makes the language more complex to learn, but it unlocks all the language's superpowers. If you 'cheat' with a GC, you get nothing. Nim started its life, just as most languages did with a GC, and the efforts to keep the syntax the same while offering alternatives are greatly compromised. It's far easier to add GC/RC to a low-level language than it is to remove it from a high-level one, where the whole ecosystem relies upon this behvaviour.

Of COURSE I know about Nim's plugabble GC options. That doesn't impress me at all (though Araq's effort is to be commended). In Nim they are compiler options, in Rust they're libraries. The difference is vital. For example, at a per-variable level, I can choose to reference count with https://doc.rust-lang.org/std/sync/struct.Arc.html if I so wish (I rarely need to because the borrow checker is magic).

If you want python, you can have it inside a Rust macro, sort of like this https://crates.io/crates/inline-python because rust macros CAN change syntax. With Macros and no GC, you can rebuild ANY FEATURE inside Rust, the floor of the abstraction is the metal, and the ceiling is the sky.

This is what Rust is all about: full power to the developer, no compromises. My video on this topic for those interested is: https://www.youtube.com/watch?v=PuMXWc0xrK0

I love both languages, but I can only see one language being the standard next 40 years, and demonstrably so can Linux, Microsoft, Cloudflare, Discord, and many others.

Re: Ask HN: Why did Nim not catch on like Rust did?

#62
post #14

Earlier quoted context omitted.

Pitch: Like Python, but faster and multicore. At least it's the reason I tried it once. It was not a bad experience.

Python will probably also be "faster and multicore" with latest proposals, so it's not a very good pitch.

Python has been getting faster, but Nim I'm sure is still a few multiples above Python.

The problem is that CPython was never built with efficiency in mind and now it's hard to add it.

Re: Ask HN: Why did Nim not catch on like Rust did?

#63
post #58
post #49

Earlier quoted context omitted.

Do you need breakthrough innovations to adopt a language? Listen, I like Rust and it has its niche for some of my projects, but not all projects should be written in Rust. Least of all because it is an innovative language. That works well as a marketing slogan, not as a factor to decide which language is more apt for the project at hand. Do I need memory safety? If yes, Rust is the best choice. But other times I need…

> Do you need breakthrough innovations to adopt a language? No, but the question wasn't "why has literally nobody on earth adopted nim?" (Which would obviously be false). The question was "why isn't it as popular as rust". There are thousands of languages out there. To be at the top of the pack, nim would have to really stand out somehow. Nim hasn't, so its a little bit niche somewhat mid-popularity language. Which i…

> To be at the top of the pack, nim would have to really stand out somehow. Nim hasn't, so its a little bit niche somewhat mid-popularity language.

I'm not sure about this argument. If Mozilla had created and pushed Nim instead, would it be as popular as what they did for Rust? I'm sure the marketing department would have found some angles to push for Nim. Maybe it would have been memory management options or that its somewhat like a compiled version of Python. I'm sure corporate minds would have figured something out. So if we could see alternate dimensions, where Nim was under Mozilla, it might be nearly as popular.

As it is, some would argue that Rust is somewhat niche, reserved for cases where memory safety without a GC is both necessary and critical. Rust ranks 20th on the TIOBE index. While nothing to sneeze at, nobody knows if it will go higher on the charts or fall back down.

Re: Ask HN: Why did Nim not catch on like Rust did?

#64
post #30
post #8

Rust 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.

Sorry to be a pedant but it's likely more like: "C++, but memory safe".

But without the C++ awkwardness

Re: Ask HN: Why did Nim not catch on like Rust did?

#65
post #3

Rust had Mozilla's backing, and later other behemoths like Amazon and Microsoft jumped onto the bandwagon. Corporate support is absolutely essential for a new language to be taken seriously in the industry. If Go weren't associated with Google, people would have laughed that language out of the room long ago. Likewise, it's difficult to imagine TypeScript ever catching on if it didn't have Microsoft's might behind it…

Considering that the Zig Software Foundation not only doesn't have any big corporate backing, but also made an explicit point of always being fully independent, and the fact that we're overall doing fine, I beg to disagree.

https://ziglang.org/zsf/

Big tech wants you to think that you're nothing without them, while in truth there are plenty of situations where small realities can absolutely out-compete them:

https://kristoff.it/blog/the-open-source-game/

If you want a proxy variable to observe wrt Zig's growth, look at the star history on GitHub: we are today more popular than Rust was at our age.

https://star-history.com/#ziglang/zig&rust-lang/rust&Timelin...

...and in fact some big tech companies are jumping on the bandwagon, like Uber, but that's an after-the-fact thing.

https://www.uber.com/en-US/blog/bootstrapping-ubers-infrastr...

> If Go weren't associated with Google, people would have laughed that language out of the room long ago.

Nah, Go gets right certain critical things, and that's why is popular. Being from Google doesn't guarantee anything, look at Dart for example.

https://kristoff.it/blog/why-go-and-not-rust/

Re: Ask HN: Why did Nim not catch on like Rust did?

#66
The answer probably lies in non-technical things, like marketing, community building and governance.

The language not having one clear thing it excels at, surely makes marketing it more difficult, so Nim would have needed more effort than normal to properly explain its philosophy to the market.

Community building and governance is also critical. Nim has a fork called Nimskull that was created because of disagreements in the core team. I don't have any insight on what happened there, but regardless having part of your core team splinter off into a separate hard fork is not good for the growth of the project. This is a HN thread from that time: https://news.ycombinator.com/item?id=32021299

Lastly, it's also a matter of luck. Sometimes you just happen to be working on something that becomes more relevant all of a sudden in a way that you couldn't predict, and some other times this doesn't happen. Zig for example became more relevant once M1 Macs came out because now all of a sudden arm64 is not a "theoretical" target anymore. Now the laptop that you want to use is arm, and so cross-compilation suddenly becomes a real thing to worry about.

Re: Ask HN: Why did Nim not catch on like Rust did?

#67

Earlier quoted context omitted.

So... you don't indent your bracket blocks?

Algorithm to read scope: - Step 1: Find open bracket - Step 2: Find closed bracket With indentation, the algorithm now becomes: - Step 1: Find something which seems to open a scope. - Step 2: Scan all indentation level until it's done. The difference is huge here.

Algin your method to the top of your screen. Now scroll one more line down. According to your algorithm, it's now impossible to know which line belongs to which scope.

I have a different algorithm:

- Find first indented line

- Find next unindented line

If that does not work for you, your code is bad.

Re: Ask HN: Why did Nim not catch on like Rust did?

#68
post #63
post #58

Earlier quoted context omitted.

> Do you need breakthrough innovations to adopt a language? No, but the question wasn't "why has literally nobody on earth adopted nim?" (Which would obviously be false). The question was "why isn't it as popular as rust". There are thousands of languages out there. To be at the top of the pack, nim would have to really stand out somehow. Nim hasn't, so its a little bit niche somewhat mid-popularity language. Which i…

> To be at the top of the pack, nim would have to really stand out somehow. Nim hasn't, so its a little bit niche somewhat mid-popularity language. I'm not sure about this argument. If Mozilla had created and pushed Nim instead, would it be as popular as what they did for Rust? I'm sure the marketing department would have found some angles to push for Nim. Maybe it would have been memory management options or that it…

> If Mozilla had created and pushed Nim instead, would it be as popular as what they did for Rust?

In my opinion, definitely not. I knew people excited about and working in Rust back in ~2016 when very few people knew about Rust. They proselytized me, I converted others, et cetera. It's all grassroots spread and has nothing to do with Mozilla marketing.

And that grassroots marketing spread rapidly and easily because of Rust's killer unique features.

Re: Ask HN: Why did Nim not catch on like Rust did?

#69
post #3

Rust had Mozilla's backing, and later other behemoths like Amazon and Microsoft jumped onto the bandwagon. Corporate support is absolutely essential for a new language to be taken seriously in the industry. If Go weren't associated with Google, people would have laughed that language out of the room long ago. Likewise, it's difficult to imagine TypeScript ever catching on if it didn't have Microsoft's might behind it…

Considering that the Zig Software Foundation not only doesn't have any big corporate backing, but also made an explicit point of always being fully independent, and the fact that we're overall doing fine, I beg to disagree. https://ziglang.org/zsf/ Big tech wants you to think that you're nothing without them, while in truth there are plenty of situations where small realities can absolutely out-compete them: https://…

> If you want a proxy variable to observe wrt Zig's growth, look at the star history on GitHub: we are today more popular than Rust was at our age.

Which does not say anything given Githubs growth and change in usage patterns from 2010 to today.

Rather, I would say Zig is lagging far behind Rust and it should have had multiples higher stars than Rust at the same time to be on "equal footing" given the multiples larger software community that exist today.

Re: Ask HN: Why did Nim not catch on like Rust did?

#70

Earlier quoted context omitted.

So... you don't indent your bracket blocks?

Algorithm to read scope: - Step 1: Find open bracket - Step 2: Find closed bracket With indentation, the algorithm now becomes: - Step 1: Find something which seems to open a scope. - Step 2: Scan all indentation level until it's done. The difference is huge here.

finding open and closed brackets is a massive chore in mis-copied code, so indeed having scope open by spaces makes things very clear and non-ambiguous. Using whitespace for readability and not using it for scope control is one of the many bugs in the design of programming languages like Java. In my very humble opinion.
Post reply on HN