Remix.run Logo
ithkuil 3 days 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 2 days ago | parent [-]

So it's easy, but complicates matter later.

ithkuil 11 hours ago | parent [-]

yep, 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)