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

string as vector of fixnums ?

> Date: Sat, 12 Dec 87 16:26:03+0900
> From: Masayuki Ida

> A Question on the history;
> When try to get a component of a string as a number, we must
> get it as a character and then coerce it to number type.
> I think it is ridiculous.

The problem is that the numbers aren't portable but the characters are.
#\A is always #\A, but it isn't always 65.  I believe Common Lisp does
not represent characters as numbers because it was trying for a more
abstract representation and to get away from the notion that each
character was a particular number.

I suspect it is relatively rare for anyone to want the number associated
with a character, and so requiring an extra step to get the number does
not seem so bad a thing.

Jeff Dalton,                      JANET: J.Dalton@uk.ac.ed             
AI Applications Institute,        ARPA:  J.Dalton%uk.ac.ed@nss.cs.ucl.ac.uk
Edinburgh University.             UUCP:  ...!ukc!ed.ac.uk!J.Dalton