@catonano (1/3) well, the difference between them is pretty clear — I was looking for a review of Nim by somebody who does understand the motivation behind Rust's features and the reasoning behind them well. The main difference between them is that Rust is completely, from top to bottom, designed to work without GC, whereas Nim uses GC—yes, you can kinda turn it off, but it never really works in practice, unless the language was specifically designed to work without GC, like Rust
@catonano (2/3), or so I've heard (again, haven't tried it myself, would be great to read somebody's review). Languages with GC (or other kinds of mostly "just working" memory management, like ARC from Swift & new versions of objc) are just in general percievably nicer & easier to learn & use, so there's that, but having a GC is also very limiting if we're talking systems programming. Rust was built specifically to tackle the use-cases where you can't really afford having GC; you
@catonano (3/3) can try to shoehorn Nim there, but it wouldn't scale to something serious (I suspect). On top of that, yeah, Rust has an actual advanced type system deveoped by actual type theorists, Nim seems much looser in that regard. Rust kinda tries to appeal to C/C++ (syntax!), ML/Haskell (type system!) and JS audiences, Nim seems more oriented towards letting Python devs do systems programming. Rust has really awesome documentation, community & ecosystem, Nim, not so much.
@catonano (and I guess I should stop trying to always use all the 500 characters allowed in a toot, because otherwise readability suffers; sorry for that)
ok, I don't know very much about system programming, I'm not even sure I understand what it means. How is Servo system programming ?
Anyway, I just want to add 2 more links
one is this
https://github.com/ckkashyap/rustix/issues/8
and another one is this
https://ckkashyap.blogspot.it/2015/02/nim-is-best-programming-language.html
@catonano yeah, I've seen all those links. There isn't a single definition of what systems programming means, but I'd say it's when you write something that gets embedded into an actual application, or something that runs those applications (like a kernel or an emulator), and/or when raw performance is really critical, so you can't have everything to yourself, so to say. A browser engine is very much that; it is all three of that, in fact.
@catonano another typical, but not mandatory thing for systems programming is when you are in a constrained, not completely usual, environment - think embedded systems, OS kernels, WebAssembly. You can't really write that in a language that brings its own large runtime with it; it needs to be a language that's just a fancier way of writing machine code.
@catonano or this: "systems programming is when it's reasonable to think about whether something fits in a CPU cache"
@catonano so the problem with "Rust vs Nim/Go" is many people go "oh, Rust is so overcomplicated; I've written a $project in $language within an hour of learning it; but I've been trying to learn Rust for a week and I still have no idea what lifetimes mean". And posts like that are actually some valuable feedback about the learning curve and the docs, but they don't mean Rust is actually overcomplicated or other languages are "better", Rust is just filling a different niche
I found this one
https://news.ycombinator.com/item?id=9050114
it seems that the main difference is in the memory management model
and maybe the type system
any comments ?