|
|
|
|
|
by AlienRobot
2 hours ago
|
|
That can't be true. If you have an array of pointers it can be terminated in NULL. But an array of integers can't have a NULL value, since NULL would probably be just 0 which is a normal integer. The null in a linked list is the null in the .next field, right? That's the way you would implemented linked lists independent of language. It's not the .value that is null. A string is an array of characters (well, for characters representable in one byte at least) that has a specific value to represent the end of string. It would be like if Int::MAX was reduced by 1 to make space for an Int:NUL constant that represented the end of an integer array. Or if you were creating your own ENUM, let's say for NORTH, SOUTH, EAST, WEST, and you added a fifth enumeration called Direction.NUL for use in arrays. |
|
A little bit related: https://devblogs.microsoft.com/oldnewthing/20091008-00/?p=16...