Nothingness (Off topic by now...)

Erik Reitsma (ELN) <>
Thu Oct 25 14:41:56 CEST 2001

> To put it another way, if there are no herrings in your net, 
> do you have
> an 
> empty net of herrings, an empty net, or nothing at all? For 
> the purpose
> of 
> the activity, I don't think the difference matters at all. No 
> fish is no
> fish -- it is also no crabs, no seaweed, no old boots. (In some sense,
> the 
> empty net is something -- it represents the capability of collecting
> fish 
> -- or crabs or boots.)

A set is an abstract concept, and something that is a set can be manipulated in different ways: union, difference, conjunction, etc. This is clearly different from e.g. a number, for which other operations are defined.
The problem is, that NULL is neither, or perhaps a special kind of both... But NULL (which would be: nothing whatsoever) is mathematically different from an empty set (which is at least something: a set, on which you can perform set operations).
Being a mathematician (whatever that means) I would like NULL to be banned. But who listens to mathematicians nowadays?
> Back to Erlang --

I think that NULL comes from pointer-oriented languages: we have a pointer, but nothing to point at. Or, in a database: we have some space here, (e.g. in a table cell) but nothing in it.
I think that the pointer issue is not valid in Erlang: no pointers!
So we are left with the empty space. Databases use a special symbol to indicate that a space is empty. In Erlang we could put a set (i.e. a list) in every "space", with zero or one elements. Then [] is a place holder, and [X] is a value. In this case, every space is occupied by a set of values. This means, that we put everything into a "net", and we always talk about nets, and the net can be empty.

I never missed NULL in Erlang, I could always found a suitable atom to occupy some "empty" space.


More information about the erlang-questions mailing list