Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Null considered beneficial

Name: Anonymous 2015-08-03 4:56

The nil or null value was discovered, seemingly independently, when creating Lisp (perhaps IPL too), PL/I, Simula, Algol W, and BCPL (where it was just integer 0).
An all-bits-zero value was already in use by assembly programmers for marking the end of a linked list or tree.
It arises naturally when implementing pointers and linked lists.
Null is a list terminator, an uninitialized value, a dummy object, a null or revoked capability.
Null makes garbage collectors and secure memory allocators possible.

Without pointers, there would still be a null analogue.
Fortran programmers used to use array indices as pointers and a 0 index as null.
Process calculi often have a null process which can be compared by identity.

Null is one of the most noble and powerful discoveries of programming.
Although it is very simple, a full understanding of its power cannot be detailed in such a short post.

Name: Anonymous 2015-09-23 4:34

>>12
How can this work for C ABI enums? It is completely valid in C to define an enum type that contains constants over the entire range of an int. It's also very common for C programmers to explicitly define enum constants for sentinel values like -1 or 0 (which will be the first value in any enumeration by default anyway).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List