[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Macros -> declarations
Date: Tue, 7 May 1985 22:50 EDT
From: "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>
Is there any hope that we can all agree on flushing macro -> declaration
expansion and replacing it with something like Skef's "declaration
macro" proposal? You state that this is the minimum acceptable position
(minimun acceptable amount of hair, I guess), and for me it's about the
maximum acceptable position. It would seem to cover about 99% of the
cases where people claim that they need the macro expansion.
Might I suggest another proposal that I think adds less complexity
for the same gain (for either side of the issue)?
Instead of DECLARE forms being allowed to be macros, why not allow the
forms INSIDE declare forms be macros? Using macros rather than
"declaration macros" lets you then use macrolet, and avoids the need for
any new "DEFDECLARE" special forms to document or implement.
This doesn't quite cover the bases, though, unless we also deal with
expanding into multiple declarations [i.e. (REGISTER X) ->
(SPECIAL X) (FIXNUM X)].
I'll propose two ways to deal with that.
1) Allow (DECLARE (FOO X) ((SPECIAL X) (FIXNUM X))) to mean the
same as (DECLARE (FOO X) (SPECIAL X) (FIXNUM X))
2) Allow (DECLARE (FOO X) (DECLARE (SPECIAL X) (FIXNUM X))). I.e.
Allow DECLARE as a declaration containing declarations.