[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>
>    ...   
>    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 guess this is interesting because a defmacro could be
construed as a preprocessing request of the
compiler...?  Requesting action of the compiler
doesn't seem to me to be sufficiently peculiar to
defmacro, though, since that's what all language
constructs, including old workhorses like `+' and
`cons', do.  

So my answer is No.

To answer the larger question (if there is one), I
think of a compiler directive as a Post-it note on
the program proper, saying things like

   | Could you do   |
   | this by 4pm?   |
   | Don't worry    |
   | about the      |
   | numbers -- a   |
   | rough estimate |
   | will do for    |
   | now.  Thanks.  |
   |                |
   | --d            |

Nothing prevents this from appearing as, say, a global
variable assignment in the program proper.  Then
it ceases to be a compiler directive.  That's all.  

To turn this on its head and say that language
constructs are themselves compiler directives is like
saying all documents are Post-it notes, which is
acceptable I guess and does certainly have a nice
Daniel Dennett-esque provocativeness to it, but
it doesn't reflect useful intent to me.