Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The original person said "evangelists" and then slid into "zealotry." And I find a lot of anti-Rust folks seem to think anyone who likes Rust is a "zealot." YMMV.

I think that this is just a hard conversation to have, with a ton of different groups who all want different things, and have different incentives.



I like rust. What I don't like is people who pretend that unsafe rust is any better than C++ or C.


But it is. Unlike C/C++, Rust does not have undefined signed integer overflow or strict aliasing rules. Furthermore, you can do a few more things with pointers that are undefined in C/C++ (e.g., implementing offsetof the naïve way in C/C++ is undefined behavior, but would not be in Rust [assuming you use raw references, which are still in the process of being added]).

In general, there's a slice of behavior that's undefined behavior in C/C++ that isn't undefined behavior in Rust, and for people who want C to really be "portable assembly," Rust is arguably a slightly better choice as a result of being less likely to accidentally trip up on undefined behavior.


Unsafe Rust is harder to predict the behaviour of than C – at least, when you're doing completely off the wall stuff like re-using the stack in two threads. You can keep it contained, though, and so long as your unsafe Rust is keeping the language's invariants, the code is safe; therefore, you know where to start looking when there's trouble to be found.

I think it depends on what you're trying to do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: