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

Re: character objects & randomness

        Date: 14 August 1980 17:43-EDT
        From: Alan Bawden <ALAN at MIT-MC>

        Character objects are a loss.  Characters are fixnums.  You perform
        subtraction to upper case them.  You add 7 to #/0 to generate #/7.
        You use > and < to determine if they are alphabetic.

Not to argue the case for them once again, but a complete character
standard includes all the primitives you want for manipulating them -
at the lowest level, things like CHAR-CODE (to coerce to a fixnum),
CHAR< (for comparison), maybe even CHAR+ (for adding fixnums to them);
at a higher level, CHAR-UPCASE and CHAR-DOWNCASE for case conversions,
ALPHA-CHARP or whatever for testing alphabeticalness, UPPERCASEP for
testing case, functions for converting digit characters to integers,
and so on.

        Would you change the MacLisp #/ to generate "character objects"
        (symbols)?  That would be an amazing loss.  If we are only talking
        about NIL, then I can live with it.

I don't think that anyone (except maybe Fateman) refers to symbols
when using the term "character object."  The idea is that they're
implemented as fixnums (hopefully immediate pointers) with a funny
type code.  If you've been thinking they're symbols, I can see why
you'd be grossed out.