3 ms·
> Null was a trillion dollar mistake. I don't agree. Null is just a tombstone value. If you're dealing with specifying memory addresses, you either specify the
by simplotek 4y ago
> Null was a trillion dollar mistake.
I don't agree. Null is just a tombstone value. If you're dealing with specifying memory addresses, you either specify the address or point a value that tells you the variable is not pointing to an address.
If anything, conflating arrays with pointers was a bad idea. The language would be far better equiped to deal with memory safety issues if an array data type included info like total size, used size, and perhaps also stride length. Relying on tombstone values to delimit strings or arrays was just prone to blow up on everyone's face.