[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
#f, '(), and true radicalism.
We, the R*RS authors, do not object to changing the IEEE draft
standard to require that #f be distinct from the empty list.
We are willing to change the R4RS to conform with the IEEE
standard if this change is made.
This is such a small issue. To me the question is not which token is
used to denote the empty list. (Unless lists become primitive types,
with their own operations separate from those on pairs, I sort of
agree with Jinx. Though if it came to a vote I would support the
I care more about truth and falsity than about the list termination
conventions. To me the question is how IF treats its predicate value.
As long as a predicate of '() and #f mean take the false branch, and
all other values mean take the true branch, there will be horrible
punning and accidentally unportable code. To me, the best of all
possible worlds is making boolean values be distinct types, and only
allow IF to accept booleans as predicates. Second best would be to
have a distinct #f for false, and let '() as a predicate mean either
true or signal an error.
So, if the proposal is a way of later tightening the meaning of booleans
and IF, then it makes sense to me. Otherwise we are just arguing over
a simple convention that should be hidden by the two abstractions
*NIL* and NULL?. If we agreed on the abstractions we wouldn't have
worry about the implementation.