Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Also nim came first, also, rust and go aren't even targeting the same use cases. Rust is for performant systems coding or webasm with far fewer footguns than c or c++. Go is for back end software with less cruft or boilerplate or latency than java but about the same throughput as java. It sounds like nim is "i just wan to get this working but I'm worried python wont run fast enough."


sort by: page size:

Based on my surface-level understanding of Nim, Go is much more comparable to Nim than it is Rust. I never understood the Rust-Go comparisons, since Rust is a serious systems programming language. I would never use Go or Nim to replace C or C++ usage as I would Rust, but I might use Nim in place of Go or Java.

Does anyone with significant Nim experience care to lend some opinions? I don't want to start a flame war--I'm genuinely curious.


Nim is interesting but isn't remotely like Rust. It doesn't have memory safety as a core goal. And there's no strong sense of design and elegance. It very much comes off as "here's a bunch of ideas thrown together with the restriction that they all must somehow compile to C".

I'm not saying it's bad or its users are wrong, but the mindset is utterly different.

Rust and Go don't belong in any comparsion really. The only reason they are compared is because Google co-opted the term "systems" to mean something different than everyone else. Go fits in much more compared to managed languages, like Java or OCaml or something. (Just because Go statically links its runtime into output binaries doesn't change things. You can do this with C# via Mono's AOT features, for instance.)


Oh, and, FWIW, most of the time Nim code runs much faster than Go. More like C/C++/Rust speed.

Using Go is a Google acquihire hedge. :)

I think that someone building a product on Rust is taking a very long view and has to make an investment in the development of the language or they are at the mercy of the changes and lack of libraries.

But seriously, why not Nim?


chicken and egg problem. Nim is a viable alternative to Rust, Python programmers feel right at home, compiles to C, and you can use any C library out there.

Nim's performance is also ridiculously fast and low memory.


I think the significant thing about putting Nim on the Go/Rust spectrum is that all 3 languages are statically typed languages, that advocate performance and compile to a single binary. So there is more to gain from comparing the 3, than say comparing Go and Rust to Ruby.

Nim has the feel of a compiled Python (with many additional features that Python is lacking). It is garbage collected, is designed to look as pseudocode'ish as possible.

Rust is designed for systems projects where GC is not a good idea, such as web browsers, or kernels, etc. One of its core design philosophies is to manage memory safely and efficiently.


It may be better than Go but I don't see how it is comparable to Rust. Rust's biggest selling point is compilation-checked memory and thread safety guarantee without garbage collection. Nim instead uses a garbage collector, or a reference counter similar (but deterministic) to Swift which can cause memory leaks, or manual memory management.

Nim is aimed at pretty much the same level as Go, I would say. Only with more modern abstractions.

And currently (with Nim 1.4 and its memory management), it's moving towards Rust's field. Their performance has always been in the same space, especially regarding cmdline tools, where latency is more important than most other tools.


I can't help but feel that given the requirements laid out in the article Nim would be a more suitable fit for their goals over Rust. I do think Nim really nails great performance with a very clean and straightforward syntax, certainly easier for someone who only works in Python to pick up over Rust.

Having played with both Nim and Rust, I also prefer Nim.

Basically Rust is a slightly more pleasant C++, but still huge, complicated, things break all the time, and there's no IDE support to help you make sense of anything. It's probably more robust, maybe faster as things get big, but I haven't got there yet.

Nim is as easy to write as Python, the toolchain is very easy to set up, creating Nim interfaces (with documentation) to your favourite C or C++ library is dirt simple (thanks to tools that come with the compiler), and the language is shockingly fast.

Right now, it's just so much easier to get things done with Nim. Reminds me of Coffee-Script - because it compiles to another language, you get access to a million libraries and platforms for free.


The main problem with nim is that you can't really pair it with Python whereas you can have Rust and Python call each other if you want.

Or you just replace Python with Nim and get the performance of Rust.

I like Nim, although I don't think it's great for everything and I do think it fills a particular niche. For me, that is a systems-programming language akin to Go or Rust with a familiar syntax. Coming primarily from Python, sometimes I need a language that is a) safe b) fast c) easily capable of producing a cross-platform executable. Nim provides all of these with a Pythonic syntax and style, and that is really the main reason I like it. It lacks the sponsorship and audience of the other two, but is still a well maintained language with an active community and all the core functionality you would likely expect. That being said, a few years ago I was a strong proponent of Nim, while today it is clear that Rust and Go have captured the mindshare and continue to grow momentum. In fact it becomes hard to recommend Nim when I think of where these 3 languages will likely be in 5 years.

Nim should look very attractive to Python developers. It's a good looking language that has positioned itself in a good market: static typing, looks and feels like scripting (not verbose), and almost systems level (has GC).

I haven't got any experience with Go development, but from those I know that use it, I hear nothing but promising things about Nim. "Modern" is a word that gets used.

Between Rust and Nim, we're starting to see some really clever new languages that fix common pain points. Both of these are so neat it makes me feel as though we're in a programming language boom right now.


If Go is somewhere in the middle and Rust is on the right then Nim is somewhere in between Go and Rust.

Personally I think that’s the sweet spot, and now that Nim is at 1.0 there is no excuse not to give it a try. As nice as Rust’s compile-time memory management is, it’s very often overkill.


Ok! What's its standard library like compared to Go? I like that I can write powerful projects with few external dependencies. I don't like that C binding is slow and C++ binding is missing.

How does it compare to Rust, which is currently top of my list to learn next?

Can you suggest a reason, or a few why Nim should knock Rust from that spot?


I honestly respect the power and rapid development of Rust but I think that Nim (http://nim-lang.org) is a much better alternative to Python than Rust, as its syntax and "feeling" is much closer to Python, and also the productivity level. In Nim I get things done much faster than in Rust. Nim is easy to learn but Rust requires a certain amount of knowledge and experience for good productivity.

I consider Nim the "better Python", and Rust the "better C++".


Doesn't Nim come with a runtime, though? Rust vs. C++ is entirely due to implementation differences, but isn't this more like C++ vs. Golang?
next

Legal | privacy