[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bawden's remarks on characters
- To: Guy.Steele at CMU-10A, lisp-forum at MIT-MC
- Subject: Re: Bawden's remarks on characters
- From: Mike McMahon <MMcM at MIT-AI>
- Date: Fri ,15 Aug 80 18:45:00 EDT
- Sender: MMcM at CADR6 at MIT-AI
Date: 15 August 1980 1739-EDT (Friday)
From: Guy.Steele at CMU-10A
Yes, adding 23. to #/A to get #/X is a neat crock. Writing
(CODE-CHAR (+ 23. (CODE-CHAR #/A))) is not that much more work,
is clearer as to what is going on, and no less efficient when
compiled (on the LISP Machine CODE-CHAR and CHAR-CODE are probably
identity macros -- but by putting in the calls to identify the explicit
coercions we give the code half a chance of being compatible witrh
other implementations).
(CHAR-CODE (+ 23. (CODE-CHAR #/A))) is #/Q in EBCDIC. #/A is 301 and
#/X is 347. In other words, the new functions haven't gained you
anything in transportability of code that chooses to do character
arithmetic. What we have here it a solution in search of a problem.