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