4 ms·
This looks like a fairly nice website. For someone coming from a background of C and D, but familiar with quite a few others, I have to ask: what makes rust di
by earenndil 9y ago
This looks like a fairly nice website. For someone coming from a background of C and D, but familiar with quite a few others, I have to ask: what makes rust different and better? Aside from memory safety, what reason do I have to choose rust over another language?
- Paul-ish 9y agoDid you have another language in mind? Eg Rusts safety means basically nothing if you are comparing it to Python or C#.
- earenndil 9y agoNot really, I more meant "in what situations should I choose rust and what makes rust the best choice in that situation instead of _any_ other language."
- kod 9y agoPython stops you from accidentally sharing mutable state across threads?
- earenndil 9y agoYes. Look up the GIL (Global Interpreter Lock).
- kod 9y agoWhich is why Python doesn't have thread locking... Except, it does. Perhaps that's because GIL isn't really helpful for preventing logical races? Yet it encourages a false sense of security?
- dragonwriter 9y agoThe GIL doesn't stop you from sharing mutable state across threads, nor does it make it generally safe to do so.
- Drdrdrq 9y agoResource safety and expressiveness on level of Python (or close) combined with speed of C. That said, while I love the idea of Rust I find the language itself offputting somehow. I don't know, maybe I just need to give it another try.
- sushisource 9y agoFor me it's a love hate thing. I love the way it stops me from doing dumb shit, and really makes you think hard about how to architect properly. I hate annoying little nitpicky stuff like it won't auto-upcast a u8 to an i32, for example. There should at least be a compiler flag to allow that. I mostly love it though. The stuff that bothers me is relatively minor and I think will go away as I get more fluent with the language.
- earenndil 9y agoHow are those different from, say, d, nim, or lisp?
- mykull 9y agoGood (and improving steadily) compiler feedback, centralized package manager, thoughtful approach to language versioning, a syntax that I like (very subjective), and the flexibility to write unsafe code blocks if for some reason you need to. Those are some of my reasons for liking it.
- erlend_sh 9y agoI would add: The most cohesive and supportive large-scale community I have ever seen for a programming language. The Rust team goes to great lengths to maintain a culture of constructive debate and good behavior. As a professional community builder I am in awe of the culture Rust has achieved in its inner circle as well as its extended ecosystem.