[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Misfeature: macros expanding into declarations



I agree with Rob: we should eliminate the ability of a macro in certain
places to expand into a declaration.  I cannot think of anything
essential that this feature buys us, and it certainly has caused many
bugs and lots of inefficiency in the various interpreters that I've
seen.  Code analysis tools would all have similar problems with this.
If I remember the original debate on this, it was a "what the hell, it
might be useful someday, let's add it" sort of decision, whose
consequeces we didn't totally appreciate.  If there's some important
case that really needs this feature, that's different, but I don't think
that there is.  Nor do I believe that there are more than ten lines of
Common Lisp code anywhere in the world (outside of validation tests)
that depend on this feature, so taking it out at this late date wouldn't
cause major upheavals.

Note that we are not arguing against the ability of a macro to turn into
some top-level form such as a DO that, among other things, contains
declarations.  We are arguing for the elimination of the feature
described on page 154, in the paragraph starting "It is permissible..."

-- Scott