5 ms·
What it is interesting is that the comment never mentions memory safety, only memory management; you just added memory safety into the discuss. Memory safety a
by gingerBill 4y ago
What it is interesting is that the comment never mentions memory safety, only memory management; you just added memory safety into the discuss.
Memory safety and memory management are not equivalent concepts. As I state in another reply (https://news.ycombinator.com/item?id=32629951 https://news.ycombinator.com/item?id=32629951), you have memory safety and manual memory management. And Odin offers numerous memory safety features as well as being designed around the power of custom allocators.
- avgcorrection 4y ago> What it is interesting is that the comment never mentions memory safety, only memory management; you just added memory safety into the discuss. Can’t speak for OP but I also assumed that you were alluding to being able to use unsafe memory management in this part > > And for you, you clearly don't need manual memory management nor high control over memory, memory layout, and memory access. Since high control usually means being able to do whatever you want (compilers always have to be a bit conservative).
- gingerBill 4y ago"usually" by whom? "High control over memory" doesn't necessarily mean doing anything "unsafe" with it either. That term could allow for "unsafeness" yes, but it is not solely restricted to that. High control could just mean adding extra annotations about the access, or not having padding in a struct, or specifying the alignment, or many other things, none of which may be classed as "unsafe".