[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: DCP@SCRC-QUABBIN.ARPA
- Subject: Readtables
- From: Brad Miller(Tech. Ops. Mgr) <firstname.lastname@example.org>
- Date: Wed, 30 Apr 86 14:04:57 edt
- Cc: email@example.com, DCP@SCRC-QUABBIN.ARPA, GJC@MC.LCS.MIT.EDU, common-lisp@SU-AI.ARPA
- In-reply-to: David C. Plummer's message of Wed, 30 Apr 86 13:19 EDT
Well, more answers, as usual, bring more questions....
A purely environmental work-around might be to set the readtable in
different listeners differently. This doesn't help you 'break out' of
the readtable into another program's readtable, however. I suspect the
least confusing thing would be to have some syntax to break out on a
local (single string) level rather than until an escape, e.g.
(similar to before the ! macro)
(pkg-goto 'USER) ;no macros
(!foo A:!foo !foo) ;1st and 3rd do not use macro, A:!foo does if A:
has defined it.
Now, we may want to say:
(!foo A:@*foo-readtable*!foo !foo)
but my feeling is that this sort of explict declaration of readtables
is rather clumsy at best, at least for 'normal' usage. Having such a
mechanism exist is probably a good idea though.
Part of the problem with distinguishing readtables and languages from
packages is that languages are ALSO designed with their own packages.
(Since they must inherit the meanings of their constructs from some
'definitional' package - e.g. CL for common-lisp on Symbolics.) It
seems like it would be less confusing to a USER if they were
associated a little closer. Now, you are quite correct in what you are
about to say: that if I try to invoke some function in CL from
Zetalisp, I should not have to say CL:frozzbozz where frozzbozz is in
the CL dialect - I should just have to name the function in that
package, which is where your distinction has appeal.
Let me give another example which illuminates the problem more
Say I write a program using the macro #\!. Since I don't want a
separate 'listener' or any other such reader for this program, I
define it in the default readtable. It gets saved in the world. Naive
user #1 comes up to use the machine and decides his variables should
all start with !. Silly Luser! He gets his variables clobbered by the
macro defined in my package, even though my package is NOT part of
USER, :USEd by USER, or anything else. Yet hack user #2 comes up t the
machine and happily calls functions in my FOO: package, knowing his
!'s will all be interpreted appropriately, even though his default
package is USER.
The thing that will be the most obvious to both users is to have the
macro invocation local to the package. Luser 1 doesn't lose, and
doesn't even have to know about the existance of !. Hacker 2 still
wins big because whenever he invokes the FOO: package, he gets it's
readtable. Luser 1 is still served if we have a separate syntax for
defining readtables - ignorance is bliss. Hacker 2 is served, but
irritated perhaps, because he feels he is forced to supply redundant
information (you and I realize it isn't but still). Maybe the 'real'
solution is to support package names, readtable names, and a way to
set both with a single (new) name?
Just more incremental thoughts. Think the idea of putting extension on
-*- line for readtable solves THAT problem quite nicely. Hope
symbolics reads this mailing list and picks up on that!
- From: David C. Plummer <DCP@SCRC-QUABBIN.ARPA>