Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One could implement many data structures without unsafe, but with less efficiency. E.g. using an arena allocator


I 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.


Sure, 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.


Point is, “for free like like in Python” really means “the C implementation hides that for you”




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: