Live data from Hacker News

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

news.ycombinator.com

91–100 of 139 posts

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

#91
post #88

Earlier quoted context omitted.

“The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.” Creating a tool t…

I see. And this is why there is no Maybe type, and an “unset” value is silently set to 0? Because fresh grads would find this easy to work with?

In general, the language lacks both complex features and low level primitives that would be useful for building anything more substantial than network glue code. Go codebases are often noted for the egregious use of copy and paste. Not that I can say that there's never a time and place for that, but it's not the kind of thing you'd be excited to work with. Give me the language Ken Thompson would solve problems in, not the language he gives his goons to solve problems in.

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

#92
post #53
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…

Nim does guarantee memory safety if you don't use unsafe features like raw pointers.

Does Nim make you explicitly enter an unsafe mode to access raw pointers?

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

#93
post #17
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.

How about the motto: “Efficient, Expressive, Elegant”?

If you told me to guess what language that motto is from, I'd have no idea. It could be basically any of them. If you say "C, but memory safe" I know it's Rust.

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

#94
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…

The counterexamples are definitely older like Python, Ruby, PHP. JS is a special case.

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

#95
post #79
post #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'…

Rust people talking about 'revolutions' love to ignore that memory safe languages without garbage collectors have been around for years. Ada+Spark, Cyclone, even D all made large steps forward in this area long before Rust was ever a thing.

Popularity counts. Find all those languages in this graph, then find rust. https://redmonk.com/sogrady/2023/05/16/language-rankings-1-2...

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

#96
post #53

Earlier quoted context omitted.

Nim does guarantee memory safety if you don't use unsafe features like raw pointers.

Does Nim make you explicitly enter an unsafe mode to access raw pointers?

What that even means? Just random words. unsafe block is just an illusion and doesn't prevent any bugs. Don't get me started on the cult that shames repos that use it.

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

#97
post #89
post #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'…

The problem with WebAssembly isn't that Nim couldn't compile to it (which it can), but that WebAssembly can't do anything without JavaScript.

We're not talking about hypotheticals. Rust wasm is used in production now. https://developers.cloudflare.com/workers/tutorials/hello-wo...

Emscripten and experimental backends hardly count as support for Nim. Python can run in webassembly by the same token, but no one would. The standard rust compiler compiles directly to webassembly, natively, with the stable toolchain.

In other languages, yes, the js bridge is a problem. However, not only will this be fixed in browsers at some point, but rust is so fast that TODAY yew.rs, a mature wasm framework, is faster than react.

My thoughts are better explained in this video https://youtu.be/P4LMfkFLRsI

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

#98
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…

I like Nim, still learning and rewrite some of my personal Java projects in it. Yes, I had same Pascal/Python exposure as well.

Well, agree with "other than being a good general purpose language", Nim doesn't have strong marketing point. Remember many years ago Rails attracted lots of developers to learn Ruby?

Hmm I wonder if Crystal will also share the same fate...

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

#99
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.

I use Nim rarely exactly for this reason. I dream of a transpiler. I would totally be the clown who would transpile to Nim which may be transpiled to C.

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

#100
post #17

Earlier quoted context omitted.

How about the motto: “Efficient, Expressive, Elegant”?

If you told me to guess what language that motto is from, I'd have no idea. It could be basically any of them. If you say "C, but memory safe" I know it's Rust.

Well, that's only because Rust is better known.
Post reply on HN