[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Splicing macro's & CGOL.
- To: MOON at MIT-MC
- Subject: Re: Splicing macro's & CGOL.
- From: George J. Carrette <GJC at MIT-MC>
- Date: Sun ,12 Apr 81 17:51:00 EDT
- Cc: BUG-LISPM at MIT-MC, LISP-FORUM at MIT-MC
After thinking about your note I see that doing something like
setq'ing a readtable can be made to be exactly like what I want.
In Maclisp what CGOL does is setq the variable READ of course,
to #'CGOLREAD, with the problem being that it is a global side-effect.
The advantage is that as you mention you do not have to read all
the forms and buffer them back.
What if instead of a global variable READ (or READTABLE) we had a
READ-STACK that was an instance variable of the STREAM being read
from? The :READ message would funcall whatever was on the top of the
stack, and read-macros could do (PUSH #'FOOREAD (STREAM-READ-STACK
STREAM)). [Maclisp aught to be able to handle this too.]
Perhaps then adopt sharp-sign-alt-mode for introducing ALTernate
readers. #CGOL meaning push #'CGOLREAD on the stack. CGOL exits with
the form =EXIT. This aught to work for both terminals and files.
"-*- Syntax:CGOL -*- " is very nice, although
[1] Maclisp doesn't support it.
[2] It is advantageous to start out in Lisp because it is easier
to write macro's and system interface stuff in Lisp than in
CGOL. This is a serious consideration, CGOL alone has enough
syntax to make certain things painfull to do.
-gjc