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

This might not seem obvious. So allow me an attempt at expanding a bit.

The difference is that a dangling raw pointer to the heap will point to anything that can be modified at any time.

But indexing a dynamic array guarantees that every elements is always well formed and safe to use.



It's true that the array approach cannot suffer from type confusion.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: