[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Red face

I am guilty of flaming without looking.  Indeed, MacLisp does NOT have a $<
function, it uses <.  This won't work in NIL, since fixnums are immediate
quantities and flonums are TWO-WORD non-immediate quantities.  It is also
dependent on how the machine represents flonums...  NIL is who has $<.  Sorry
about that.

This shows up the problem with creating an "efficient" function for handling a
special case easily open coded, and then applying it to more than one type.  I
think NIL will need to have a $< function.  I really don't think it is a good
idea to depend on being able to represent fixnums and characters in an 'almost
the same' manner.  However, I don't hvae any objection to generic functions,
and GREATERP and LESSP should work on characters.  Of course, LISPM people use
< and > as their generic functions with GREATERP and LESSP as alternate names
for compatibility, so < and > should work on the LISPM (and will, of course, if
LISPM continues representing characters as fixnums) I do think CHAR< should
exist.  It provides documentation in the code that something is a character,
the possibility of type/range checking at run time if desired, guarenteed
compatibility, all of which cannot be provided otherwise.  It's cost is a few
lines of code and documentation.  I really can't see it as a threat to LISP's
racial purity.