note
Errto
<p>Just wondering: does this same idea apply to any language that allows constructs within the code itself to affect the syntactic structure of that code? Take, for example, the following theoretical Haskell expression:
<c>
foo =+= bar //|/ baz =+= qux
</c>
The parsing of this expression depends on the relative precedence of the two operators and possibily, but not necessarily, on the associativity of =+=
It may also result in an error, if //|/ has higher precedence and =+= is declared as non-associative.</p>
<p>However, the parsing of this does not depend on <em>executing</em> any code in the sense that the OP means, I think. That is, there must be a static declaration somewhere else in the code that says what the properties of these two operators should be. It need not lexically precede the usage, but it has to appear somewhere in the relevant scope, and it cannot be dynamically generated in any way. How would that fit in?</p>
663393
663393