[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
string as vector of fixnums ?
- To: common-lisp@sail.stanford.edu, ida <@relay.cs.net,@utokyo-relay.csnet:ida@tansei.cc.u-tokyo.junet>
- Subject: string as vector of fixnums ?
- From: Jeff Dalton <jeff%aiva.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK>
- Date: Sat, 12 Dec 87 20:07:29 GMT
> 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