[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What is that -*- line for, anyway?
- To: GJC@MC.LCS.MIT.EDU
- Subject: What is that -*- line for, anyway?
- From: Lab Manager(Brad Miller) <email@example.com>
- Date: Wed, 5 Mar 86 14:02:49 est
- Cc: DCP@SCRC-QUABBIN.ARPA, common-lisp@SU-AI.ARPA, fahlman@C.CS.CMU.EDU
- In-reply-to: "George J. Carrette"'s message of Tue, 4 Mar 86 23:18:16 EST
Date: Tue, 4 Mar 86 23:18:16 EST
From: "George J. Carrette" <GJC@MC.LCS.MIT.EDU>
To add to what you have said historically speaking, orginally
it was easier for an editor to understand "-*-" rather than some
form such as (MODULE "name" :package "foo" :syntax "bar)
presumably because the "-*-" first showed up in the TECO implemented EMACS
editor on the PDP-10. Predating lispmachines of course (not by much,
so an ITS historian should check me on this).
Later the "-*-" syntax was extended to require/allow such things as
package:(FOOBAR :USE (GLOBAL BAZ)
:SHADOW (CAR CDR CONS));
>From this it is obvious that our Mr. Lab Managers comment about "-*-"
being easier to parse "for your editor so that it need not actually
'read' lisp" is both ignorant and condescending. The stuff after the
":" must be parsed with READ.
1. Hardly ignorant nor condescending, as I was not talking about lisp
FORMS. Your editor need not read the
lisp IN THE FILE to determined the package of an expression, because
an appropriate form is on the attribute line. Furthermore, that is all
the editor is expected to know. If you change packages in the middle of
the filed, the editor is not expected to follow the switch. Nor do I
think we should expect it to, nor is this issue part of CLtL, hence my
2. On the symbolics (at least) use of the make-system construct allows
you to specify the package to compile or load a file into. It
OVERRIDES anything on the attribute line. This makes a lot of sense:
common subroutines can be loaded into my package this way, but if I
were to edit the subroutines the attribute line would have to be
overridden if I expected immediate effect on *my* programming
environment (that is, the one I had loaded it into).
Conclusion: the attribute line's idea of the package and the package a
file is compiled or loaded into are independant entities and should
remain that way. Both are environment issues, neither must be
specified by CLtL, and my opinion is that neither should be.
Brad Miller ARPA: firstname.lastname@example.org UUCP:rochester!lab
(also miller@rochester for grad student stuff)
Title: CS Lab Manager
Snail: University of Rochester Computer Science Department
617 Hylan Building Rochster, NY 14627
PS: sorry for the 'lab' signature, but my 'miller' account is on a
lispm which currently does not forward to the arpa net.