3 ms·
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 beca
by ithkuil 1y ago
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
- malkia 1y agoSo it's easy, but complicates matter later.
- ithkuil 11mo agoyep, as it should, since memory safety with explicit memory management is complicated. If you use a language that allows you to do it in a non-complicated way it's just shifting the complication somewhere else, and if you're not aware of that you will likely have an unsafe program that will contain memory safety bugs (which often become security issues)