3 ms·
It's not 'boilerplate', and rust is remarkably good at removing boilerplate. It's that in this case, what you've described as "the actual algorithms" is only a
by monocasa 8y ago
It's not 'boilerplate', and rust is remarkably good at removing boilerplate. It's that in this case, what you've described as "the actual algorithms" is only a small part of the semantics that are provided by a safe, generic data structure under Rust. If you want to ignore all of that and only want the C++ level of semantics, writing the code in unsafe blocks is all you need to do.
- gmueckl 8y agoIf I have to write in unsafe blocks, then what is the point? I get the intent to prove memory accesses to be correct during compilation. But if a simple linked list turns into a nightmare project then I get the feeling that this language has missed the mark on usability as a systems language.
- monocasa 8y agoThe thing is, that proving that the interface for "a simple linked list" is safe is actually nontrivial. It's not something that translates into day to day Rust. It's just a different language, different parts are hard (most parts are easier IMO). Picking off a linked list just happens to be one of the hardest pieces.