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

RE: compiler directives; (was: Re: cheerful static typing (was: A



>    From: Dorai Sitaram <ds26@gte.com>
>    Date: Thu, 10 Jan 2002 12:20:38 -0500 (EST)
>    ...
>    I really don't have a problem with compiler directives
>    being treated as lang constructs.  It is the other-way
>    smudging, ie, all lang constructs are compiler
>    directives (which was what was suggested here)
>    that strikes me as requiring some more persuasion.  I
>    mean, is `set!' really a compiler directive?  Is
>    `lambda' a compiler directive (an Ultimate Compiler
>    Directive even)?  I don't see that yet.
>
> Here is a more interesting case: is a Lisp macro
> definition a compiler directive?
>
> --Guy

I would answer no, but simply by (my own?) definition: the nature of Lisp
macros is quite clearly defined, and it makes sense to exclude them from the
definition of compiler directive.  Both are "executed" at compile time, and
both can affect the generated code, but their purpose seems different enough
to make a distinction between the two, and it seems possible to make that
distinction clearly in practice.

It seems to me a problem arises when you try to come up with a sweeping
general definition which says something like "a compiler directive is
something that executes at compile time" - anything like that is going to be
too broad and fuzzy to be useful.  That doesn't mean that the family of
things that happen at compile time can't usefully be distinguished from each
other, though; it just means that the definition of compiler directive has
to specifically exclude things that might otherwise be considered compiler
directives, but aren't, cuz they're just not! ;)

Anton