Conversation

Maybe the biggest unanswered question about Rust is how much the borrow checking rules can help performance by improving compiler alias information. (There is some use of noalias but it's not very aggressive yet.) If they do by a lot, that changes the calculus for using Rust...
21
284
Like, if the borrow check helps runtime performance, then why wouldn't you use Rust over alternatives? It'd be safer *and* faster.
5
98
Replying to
Have a newbie write a linked list in rust to see the problem. I'm a fan, but you really have to understand things before you jump in. Obviously we all WANT devs to know their tools before writing a line of code, but other languages can be a bit more forgiving while folks learn.
2
1
Replying to and
Not more difficult to write a correct linked list implementation with Box<T> (singly-linked) or Rc<T> / Weak<T> than malloc in C. Those types exist in C++ as a higher level, easier to use replacement for malloc/new (std::unique_ptr<T>, std::shared_pointer<T>, std::weak_ptr<T>).
1
Replying to and
I'm not sure what that's meant to demonstrate. If you used the wrong types in C++ you would have the same problems but often with runtime memory corruption which you may not notice and which is hard to debug. In C, you're on your own to manage it properly. How is this harder?
2