<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 24 July 2014 22:03, John Colvin via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thursday, 24 July 2014 at 11:39:13 UTC, Manu via Digitalmars-d wrote: </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
Although... the more I think about it, the more I wonder why it matters if<br>
the syntax is ambiguous when the name is taken in isolation, that never<br>
actually happens...<br>
Why can't it just mean 'either the template, or the default arg<br>
instantiation', and be resolved when it's actually used?<br>
Is it possible for templates or types to both appear in the same context<br>
and create an actual ambiguity? What would that expression look like?<br>
The only place I can imagine a conflict could occur would be within an is()<br>
expression, but I'm not sure... can a uninstantiated template be used in an<br>
is() expression where a type would also be a meaningful fit?<br>
<br>
Generally, templates do this:<br>
  T!()<br>
And types do this:<br>
  T var;<br>
<br>
It's clear syntactically from 'T!()' that T is not a default args<br>
instantiation of T, because it's involved in a template instantiation<br>
expression.<br>
It's also clear from 'T var' that T is not a template, because a variable<br>
needs to have a type.<br>
</div></blockquote>
<br>
Seeing as templates can resolve to other templates, mixin templates, values, functions and types, the situation is complicated.<br>
</blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">This is just FUD without any case for consideration.</div><div class="gmail_extra">All of those different resolutions imply different syntactic contexts. I'm still not sure of a case where a genuine ambiguity arises.<br>
</div></div>