15 ms·
> My point is just that in any modern language at a reasonable level of granularity, the order in which you write the code is 99% independent from the order in
by evanrmurphy 16y ago
> My point is just that in any modern language at a reasonable level of granularity, the order in which you write the code is 99% independent from the order in which you execute it.
I believe that in most dialects of lisp, macros must be defined before they can be called. [citation needed]
This is not to undermine your point, which I think is valid. Macros would just be an interesting exception because they're arguably the feature of lisp, and surely make up > 1% usage for that family of programming languages.
- steveklabnik 16y ago> Macros should be written so as to depend as little as possible on the execution environment to produce a correct expansion. To ensure consistent behavior, it is best to ensure that all macro definitions are available, whether to the interpreter or compiler, before any code containing calls to those macros is introduced. - Common Lisp the Language, http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/html/cltl/clm/node97.html http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/html/c...
- evanrmurphy 16y agoThat was also the most relevant snippet I found while searching. :) Unfortunately, I couldn't quite figure out if it was a confirmation of my claim or a rebuttal. Would you mind clarifying?
- steveklabnik 16y agoI know about as much as you do. I did some googling, and maybe it's because I'm sitting at pitt.edu, but cmu.edu seems authoritative. ;) To me, this paragraph says "using a macro before it's defined is undefined behavior," and seems to back up your assertion.