Template instantiation syntax

Jarrett Billingsley jarrett.billingsley at gmail.com
Sat Oct 11 19:33:56 PDT 2008


On Sun, Oct 12, 2008 at 4:16 AM, Bill Baxter <wbaxter at gmail.com> wrote:

>>> But even then, the result has to be so much better than ";" that it's
>>> worth breaking backwards compatibility.  I think that's a hard sell.
>>> ";" works and its not totally terrible, and it does have precedent
>>> with the semicolons in regular for loops.

It's no different than .() vs !() in that regard.

> Walter seems to think there is for some reason.  Maybe because of
> foreach(x in y in z) ?

It's still grammatically unambiguous.  The first 'in' is interpreted
as the end of the index list and the beginning of the container
expression; and the second 'in' is parsed as the container expression.
 It looks dumb but wouldn't come up that often anyway.



More information about the Digitalmars-d mailing list