3 ms·
One could implement many data structures without unsafe, but with less efficiency. E.g. using an arena allocator
by Ar-Curunir 4y ago
One could implement many data structures without unsafe, but with less efficiency. E.g. using an arena allocator
- dahfizz 4y agoSure, but that is kind of what I mean. Safety in rust is something you actively have to think about and work around (at least some of the time). It doesn't just come for free like in python.
- bogeholm 4y agoPoint is, “for free like like in Python” really means “the C implementation hides that for you”
- estebank 4y agoI would like to dispute the "with less efficiency" simplification, because depensing on the size and usage patterns of your code, a doubly linked list or sikilar graph datastructure, backed by an arena will be faster than the way those data structures appear in books.