[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using t
- To: Mcdermott at YALE
- Subject: Using t
- From: Jonathan Rees <Rees at YALE>
- Date: Fri ,16 Apr 82 13:36:00 EDT
- Cc: T-Discussion at YALE
Date: 16-Apr-82 10:50AM-EST (Fri)
From: Drew McDermott <Mcdermott>
To: Rees
Re: Using t
1) Will read, write, etc. eventually have optional stream args?
(Sure would be useful.)
Right now the stream arg is required. To make this a little easier to bear
there are variables SO (= STANDARD-OUTPUT) and SI (= STANDARD-INPUT).
(This is not an "official feature" - names subject to change.)
E.g. (READ SI), (PRINT FROB SO). Eventually you may be able to say
(READ) and (PRINT FROB) but not until the compiler can handle "optional"
arguments in an efficient way, which it can't right now.
2) We couldn't get BIND to work. The error message concerned an
undefined procedure or something. The example was (BIND ((Y 5)) Y).
It used to work. I'll look into it.
3) Will there ever be upper-lower case flexibility? We have decided
this isn't really urgent,but would be useful. If it gets implemented,
it would be nice to have 3 modes: force to upper, force to lower, and
switch. (How hard would it be for us to implement this?)
New version of reader to be released soon has a parameter
*TRANSLATE-CONSTITUENT*. (For an explanation of the term "constituent"
see the Common Lisp manual.) Its default value is CHAR-UPCASE (coerce
to upper case) but you can set it to ID (no coercion) or CHAR-DOWNCASE.
----------
Helpful hints:
To implement / as the escape character, and disable \:
(SET-SYNTAX #\/ (SYNTAX #\\))
(SET-SYNTAX #\\ (SYNTAX #\X))
To implement ! as a dispatching read macro, like #:
(SET-SYNTAX #\! (MAKE-DISPATCH-READ-MACRO))
To make !\ read in the same as LAMBDA:
(SET-DISPATCH-SYNTAX (SYNTAX #\!) #\\
(LAMBDA (STREAM CHAR ARG)
(IGNORE STREAM CHAR ARG)
'LAMBDA))