On 08/21/2013 09:17 PM, Dicebot wrote:
They are orthogonal and not exclusive. "declaration foreach" can appear whenever declaration can appear and insert new declarations, contrary to statements of normal foreach. "static foreach" is simply an improvement over existing "tuple foreach concept" which allows it to work with a wider variety of input. Former is about context of foreach itself, latter - about behavior of the loop.
I disagree. I think the relationship between foreach and static foreach should essentially mirror that of if and static if.