On Sunday, 7 May 2017 at 23:20:26 UTC, Adam D. Ruppe wrote:

I would just write it `else static if` all on one line and not indent further. Then it barely looks any different anyway.

I just realized that I accidentally posted this while editing.
I agree with you on that this is barely different from just adding "else".

The example that I wanted to put was the following.

{
    enum index = ...;
    static if (I >= args.length)
       return ...; //uses index
    else
    {
       enum result = ...;
       static if (!result[0])
       {
          static if (name.length == 0)
             return ...;
          else static if (result[2] >= txt.length)
             return ...;
          else
             return ...;
       }
       else
       {
          enum next = ...;
          static if (!next[0])
             return ...;
          else
          {
             ...
             return ...;
          }
       }
   }
}

Reply via email to