<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-09-19 23:18 GMT+02:00 Jonathan Marler via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Monday, 19 September 2016 at 21:14:38 UTC, Stefan Koch wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Monday, 19 September 2016 at 21:09:37 UTC, Jonathan Marler wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I don't know if I would call this a "destabalizing" language change though.  It should be backwards compatible with the existing semantics.  It adds an extra step to type deduction, but this would be the very last step of type deduction so it would not override any existing semantics.<br>
</blockquote>
<br>
Consider void functionOrTemplate() {...} and functionOrTemplate(uint N = 1)() {...}<br>
</blockquote>
<br></div></div>
Oh you're right, I didn't think that templates could share the same name as functions.  You can't do this with classes:<br>
<br>
class classOrTemplate { }<br>
class classOrTemplate(uint N=1) { }<br>
<br>
With this new information, yes this would be a "destabalizing" language change.  Thanks for the example.  I'm against this.<br>
</blockquote></div><br>No you can't. The example is wrong, but Stefan is right.<br>Consider:<br><br>```<br>template Foo (T = string) { }<br><br>template TakesAlias(alias Sym) {}<br><br>alias TakesAlias!(Foo) Bar;<br>```<br><br>In this context, is `TakesAlias` instantiated with the template or the template instantiation ?<br><br>It is essentially the same category of problems as when trying to use a parameterless-functions, sometime you end up calling it because of the optional parenthesis. Except that for functions we can use `&` or `typeof`.</div></div>