shouting versus dotting

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun Oct 5 18:08:03 PDT 2008


On Sun, Oct 5, 2008 at 8:57 PM, Chris R. Miller
<lordsauronthegreat at gmail.com> wrote:
>
> The !() syntax seems to serve only as a heads up that it's a template.
> Otherwise (as far as I can tell) a simple foo(int)(bar, baaz) would work
> just as well as foo!(int)(bar, baaz).
>

Unambiguous grammar, you fail it.

foo(bar)(baz); // template instantiation or a chained call?

This _can_ be _made_ to work, but it would mean that the parse tree
would be dependent upon semantic analysis, and that just makes things
slow and awful.  I.e. C++.



More information about the Digitalmars-d mailing list