| ▲ | rich_sasha 3 days ago | ||||||||||||||||
I'd say the complexities of Rust just lie elsewhere. Building a linked list is trivial in C++ (well, third time round, after two segfaults), whereas in Rust it requires a degree in borrow checker ology. But yes, I used C++ extensively about 20 years ago and no longer understand any new developments in this language. | |||||||||||||||||
| ▲ | ithkuil 3 days ago | parent | next [-] | ||||||||||||||||
Writing linked lists in rust is super easy (just use box, rc etc). Writingefficient linked lists in rust OTOH requires more advanced concepts. But that's because the language gives you more guarantees about safety than C++. That safety is not only important for the implementation of your code but also for the memory safety of your code when combined with other code that calls your code | |||||||||||||||||
| |||||||||||||||||
| ▲ | steveklabnik 2 days ago | parent | prev [-] | ||||||||||||||||
You can write it in Rust with unsafe the same way you would in C++, so it's at least equivalent. | |||||||||||||||||