[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>
    To:   LISP-FORUM
    Re:   character objects & randomness

    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 on an EBCDIC machine you sure don't.  It would be nice if EBCIDIC were
flushed, but IBM isn't about to evaporate.  Transportability aside, there are
good CODING STYLE arguments for character objects.  It is damned useful to know
by inspection of the code that the 'fixnum' being handled is in reality A
REPRESENTATION OF A CHARACTER!  Even better, if your program is writing a file
to be read on another machine, it is nice if PRINT knows they are characters!
A character is not JUST a fixnum.  A fixnum can REPRESENT a character, but it
does not have the IDENTITY of a character.
    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.
As in my previous note, this is somebody's brain bubble.  Nobody, absolutely
nobody, has ever suggested to my knowledge making #/ generate "character
objects".