title: Is D's "static if" declarative or procedural?
body: <p>Consider the following code:</p>
  <pre><code>static if (!is(MyStruct))
  {
      struct MyStruct
      {
      }
  }
  
  static if (is(MyStruct))
  {
      static assert(0);
  }
  </code></pre>
  <p>My original understanding has been that <em>the order of declarations (in global scope) does not matter</em> in D.</p>
  <p>However, in this case, the order of the <code>static if</code>s makes the difference between whether or not the program compiles.</p>
  <p>Is D's compile-time evaluation stage, therefore, a procedural feature (like C/C++), a declarative feature, or something else? What is it currently, and what is it planned to be (if the two are different)?</p>
  <hr />
  <h2>Edit:</h2>
  <p>I just realized, the problem doesn't even end here. What happens of a <code>static if</code> uses <code>.tupleof</code> to enumerate the members of the current module, and create the same type of problem?</p>