Reminds me of the three or so years HN was obsessed with all things node.js and npm that ended about three years.
Rust is a great language, not my preference (Julia is better imo, and I still absolutely love C), but the community and tools being built in Rust are fantastic.
Can we please stop saying X language is "better" than Y? It really does not make any sense. Both languages were designed with very different goals in mind. Each of them is a good fit for their respective use cases, but saying Julia is "better" than Rust makes no sense.
Completely disagree. There's a tendency these days to say that because you can't quantify better-ness, things can't be better. Which isn't true at all; betterness can be subjective or heuristic or approximate.
Of course, saying something is better than something else is always prefixed with an implicit "I believe that...", so it's fine to argue with it. But that doesn't mean it's an illegitimate thing to say.
No, definitely not. There are so many programming languages and they are all usable for >90% of all the programming problems out there. So there's significant overlap.
Some languages are better: more conducive to popularity; safer; more conducive to not wasting resources; nicer to work with; more expressive. We don't have reliable methods of objectively measuring these metrics, but they do exist.
Rust, I believe, has a pretty high aggregate score.
I'm out of the loop, what is the huge fascination with Rust? I see people getting excited about normal sounding projects that are written in rust - is it the new C? new python?
The thing people get excited about are guarantees you get when compiling your (hopefully well written) Rust code.
A huge chunk of software we have today is built upon other software that is built upon other software that ... but that whole foundation is rather shaky and probably incorrect. Basically, if you want to express it that way: Everything is broken and we have played the wrapping game for far too long as a professional group. There will probably forever remain bugs in that gigantic mountain of code, that we rely on.
People get excited about rewriting things in Rust to avoid a good chunk of the legacy code written in languages that are not memory save and that do have a lot of undefined behavior or allow for race conditions easily once you even as little as touch concurrency. People want to finally have a solid basis, which is proven to be correct in implementation. Rust goes a long way towards this goal, so people like it.
I subscribe to some great projects' repositories and read the issues. These projects sometimes bring me great value and I am not saying they aren't useful. Usually however, non-trivial C++ or C (and other languages) projects have all the same kind of issues. People thinking every noun has to be a class and the standard paradigm of mutating everything everywhere, be it through setter or directly, then forgetting to update state at some point, where it was necessary. People sharing state across multiple threads and forgetting to acquire a lock or releasing it. Or in some other way building race conditions. People thinking they will be able to do manual memory management correctly and then having segfaults, which require long debugging sessions or a lot of experience to fix. Use after free bugs. Security issues resulting from such causes. This and all that kind of stuff, that a good type system should prevent you from doing. And that is where Rust delivers.
Here's a relevant statistic. Microsoft tracked all their security vulnerabilities over 10 years and found that 70% of them were caused by memory-related bugs.
Others may give a better answer, but from my perspective -- a data engineer who started learning rust maybe 8-10 mo ago -- I find that I am enjoying Rust because:
* It has algebraic data types, pattern matching, etc. - language features that just don't exist in most languages I've used. (I did play with F# for a bit and really loved its capabilities, but I've never had the occasion to get into F#, unfortunately.) Once I start using these features, I suddenly find that all these other languages are sorely lacking.
* Its safety guarantees mean that I spend more time in the IDE fixing compiler errors and less time in the running exe finding my problem. I often find that when my program compiles, it is generally correct. This has given me a lot of confidence in the quality of my releases (borne out in actual production code, not just toy projects)
* Speed of execution is (in my experience), better than an order of magnitude faster than in other languages for a similar implementation.
YMMV, and there may be some of that New Relationship Energy here, but I can absolutely see why it's been on SO's most loved languages for five years in a row[0].
Have since rewritten server from nodejs to Rust. There the line count grew. But async/await was splendid there, & serde made implementing the json server/client protocol straight forward
Aside from being a generally well-designed modern language with good tooling, I think the most interesting thing about Rust is that it accomplishes something that I wouldn't have thought was even possible until Rust came along: they made a memory-safe language that doesn't use garbage collection. The end result is that if you want to write high performance code, you don't have to do it in a language that's difficult to use correctly.
Borrowchecker and lifetimes automatize a big chunk of verifying all the states my code can yield.
Rust has many zero cost abstractions that make writing things easier.
It’s super high level at the speed class of C - sometimes even faster given that libraries for common tasks are well programmed. With the high level abstractions the compiler may probably reason and optimize better?
Jokes aside thanks for sharing. It’s always interesting to read game source code and Rust beginners can learn a lot reading this code.