Live data from Hacker News

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

news.ycombinator.com

31–40 of 139 posts

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

#31
post #23

You need a killer feature to gain ground on those traditional, well-established languages in the industry. Only marginally better is not enough for people to invest so much as to introduce a new language in a serious company. This killer feature needs to provide really clear advantage so that a risk-benefit analysis can show that even introduce this new language is a significant undertaking, it is still worth it. For…

Basically a language needs something I can use to sell it to other people in the organisation.

I can't just cowboy stuff with $language because other people would need to maintain it.

C# is the de facto language for Unity-based software.

With Go I can cross-compile a single executable blob and distribute that easily to a heterogenous environment. It also does concurrency _really_ well.

Python is the one that the data analysts know how to use

Rust is for those cases where none of the above are fast enough or memory efficiency is a big thing.

What does Nim do?

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

#32
When Rust was able to get rid of a class of memory bugs, undefined behavior, concurrency bugs without a garbage collector, it achieved a breakthrough. You can now write JS or Java VM in a language that doesn't have buffer overflows, dangling pointers and all kinds of other nasty security vulnerabilities.

Nim doesn't GUARANTEE memory safety, so it's basically... better Pascal? It's an iterative improvement that nobody is getting super excited about. Why is it better than D, V, Delphi?

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

#33
post #6

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.

This was a point about 10 years ago, then history settled the matter and people are using Python or not using it mostly because of what they have to do than because of syntax.

I do have a customer using Python. We had our share of bugs introduced by wrong cut and paste or manual git conflict resolutions after merges for code like

  for x in a_list:
    if cond():
      do()
    else:
      other()
    something()
That latter something() was actually outside the loop but got inside and tests didn't caught the error. There is the variant where something() should be inside the loop but got moved outside.

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

#34
post #9
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…

While I agree that corporate support plays a huge role with market share and acceptance, I disagree that Go would have been laughed out of the room. Very likely that a language made by Griesemer, Pike, and Thompson would have got lots of attention. Arguably enough to catch on anyway. These men are already famous, in programming circles. Case in point, look at Jai, with just the star power of Jonathan Blow and how wel…

I don't think that Jai is a very good example. I doubt a single one of my coworkers will have heard of it but they've all heard of Go.

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

#35
I think instances where transpiled languages becoming more popular than their targets would be the exception not the rule. At the end of the day, you generally are advised to be proficient in the target language to use the transpiled language skillfully or to be able to effectively debug it, and if you're already proficient in the target language, you likely can just write the target language directly and have cleaner/faster/optimal output.

Typescript would be the notable "exception", and even that had huge backing, and I'd still have a hard time believing even typescript has really surpassed javascript in usage.

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

#36
post #32

When Rust was able to get rid of a class of memory bugs, undefined behavior, concurrency bugs without a garbage collector, it achieved a breakthrough. You can now write JS or Java VM in a language that doesn't have buffer overflows, dangling pointers and all kinds of other nasty security vulnerabilities. Nim doesn't GUARANTEE memory safety, so it's basically... better Pascal? It's an iterative improvement that nobody…

There is more to software engineering than just memory safety.

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

#37
post #6

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.

Same here. Similarly, I stay away from macros. I think they have a detrimental effect on Rust’s development as well, where sometimes proposals of semantic features are rejected, because something can be done with macros on the syntax level. Maybe it can, but each time it’s inferior. So not only does a user need to deal with macros written by others, but some things aren’t going to get macro-less solutions and the user is forced to write macros from time to time as well (if there isn’t a crate with them ready). And don’t even get me started on the effect of proc macros on compilation times.

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

#38
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".

I feel like rust has been having a lot of success recently in areas that were previously dominated by c not c++, but i'm not that familar with the rust landscape so maybe i am mistaken.

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

#39
post #14
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.

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.

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

#40
post #19

The main reason IMO: Nim 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 Un…

This post nails it.

> I think Mojo is going to hurt Nim adoption.

Mojo is interesting. Python is a genuinely terrible language with an unparalleled library ecosystem. I hope something saves me from the tyranny of Python. But I'm not optimistic.

Post reply on HN