Ordering, nil < false < true < xxx. Would that make sense?

Hi,

While implementing some Prolog like matching with free/bound values
I ended up defining: Free < Bound (something free is less than something
bound).

I was wondering if something similar would make sense also for the ordering
relationship of false/true and potentially nil too.

Assuming nil means “nothing”.

That nil is less than something seems rather intuitive.
That something false is slightly more than nothing seems intuitive too.
And that something true is more than something false…
And that something more than just true is more than just true…

OTOH I don’t like the idea that 1 + nil would be equivalent to 1 + 0
because addition already defines “nothing”, it is zero. Idem for
for “x” + nil, because concatenation defines “” for that.

OTOH, that both false and nil are false today is really convenient.
Are there nice languages where nil is less than anything else ?

Yours,

Jean-Hugues

···

Web: http://hdl.handle.net/1030.37/1.1
Phone: +33 (0) 4 92 27 74 17