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

Re: #\EOF ... Yes, again.



    From: Alan Bawden <ALAN at MIT-MC>

    A character is something that you can put in strings and pnames.  You
    can TYO it.  You can hold down the meta key and type it.  #\eof fits
    none of these descriptions.  So it must be that #\eof isn't a
    character.  This makes it different from everything else that a
    #\<foo> can be.
    
This is what my mail yesterday was about.  The enf-of-file indicator
is not a character, but it is in the same name space as characters,
and therefore it really IS elegant to use a \# construct.  See yesterday's
letter for details.

	Argument: All TYI's and TYIPEEK's return -1 at eof; why not
		  just use that?
    
	Answer: (1) All TYI's and TYIPEEK's return #o101 for "A" being
		typed, but #/A was thought to be more readable.
    
    Do I believe what I read here?  I thought that you wanted to have #/
    and #\ return character objects.  And I thought that you wanted to
    write code that workes on an EBCDIC machine?

No, you miss his point; he is being sarcastic, saying that you should no
more depend on the -1 than you should on the 101, even if all
implementations now are the same, because there might be different ones
in the future.

    Nobody will ever make this mistake (making -1 a character) and live.
    
It doesn't matter; it is inelegant to depend on it.

Golly gee, the Lisp Machine Manual really doesn't document the -1.  What
do you know...