<div dir="ltr">In other words, the proposal is more-or-less that C++ should introduce a new token, ::&lt; , which is treated by the parser as &quot;The same token as &lt; but it&#39;s invariably an angle bracket, not a less-than sign.&quot; Phrased that way, the proposal is <i>simple</i>, but that doesn&#39;t make it <i>good</i>.<div><br><div>I would like to see some kind of cleanup around angle-brackets, but this particular small fix doesn&#39;t provide enough benefit to justify its cost.</div><div>The cost of changing the parser is honestly not very big (we did it for operator&lt;=&gt;). But our changes should find ways to improve <i>the code people already write</i>, like</div><div>    template&lt;enable_if_t&lt;X,int&gt;=0&gt; // syntax error because &quot;&gt;=&quot; is a token<br></div><div>The proposed change merely takes code that people already avoid (because it is ugly) and introduces a special-case ad-hoc hack to make it <i>still ugly but 7 characters shorter</i>. Which nobody will use, because in order to use it you have to know that the problem exists, and once you know the problem exists, the problem is already solved. The problems we should focus on solving are the problems that people tend to run into <i>without</i> understanding them.</div><div><br></div><div>I don&#39;t like &quot;Down with typename!&quot; either, but at least it was focused on making the compiler accept <i>the code that people already write</i>. This proposal just makes up a <i>new</i> syntax that people won&#39;t want to write (even if they knew they could, which they won&#39;t).</div><div><br></div><div>Lastly, isn&#39;t `x.get&lt;0&gt;()` already fixed by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1787r6.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1787r6.html</a> &quot;Declarations and where to find them&quot;?</div><div>I&#39;m even more confident that it fixes</div><div>    using f = T::type&lt;0&gt;;</div><div>because that is a typeid-only context, where the `&lt;` cannot possibly denote a less-than sign.<br></div><div><br></div><div>my $.02,</div><div>–Arthur</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 8, 2021 at 4:21 PM Jean-Baptiste Vallon Hoarau via Std-Proposals &lt;<a href="mailto:std-proposals@lists.isocpp.org">std-proposals@lists.isocpp.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi, <br><br>&quot;x.template get&lt;0&gt;()&quot; becomes &quot;x.get::&lt;0&gt;()&quot;. <br><br>(That&#39;s addressed in the first email, but perhaps the formatting makes that unclear)<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 8 oct. 2021 à 22:15, Barry Revzin &lt;<a href="mailto:barry.revzin@gmail.com" target="_blank">barry.revzin@gmail.com</a>&gt; a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 8, 2021 at 2:11 PM Jean-Baptiste Vallon Hoarau via Std-Proposals &lt;<a href="mailto:std-proposals@lists.isocpp.org" target="_blank">std-proposals@lists.isocpp.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">The current disambiguator for template members of context dependent ID is excessively verbose, to the point where members functions template needing explicit parameters are largely avoided. This is a problem. <br><br>I think that the Rust &quot;turbofish&quot; syntax provides an elegant alternative, which consists of having the token &quot;::&quot; preceding the template parameters list. <br>That is the code <br><br>```<br>x.template get&lt;0&gt;();<br>using f = T::template type&lt;0&gt;;<br>```</div><div dir="ltr"><br>becomes :<br><br>```<br>x.get::&lt;0&gt;();<br>using f = T::type::&lt;0&gt;;<br>//                       ^^<br>```<br><br>I hope that you&#39;ll agree that this syntax is more ergonomic. It&#39;s also not unpleasant from a semantic point of view, as &quot;::&quot; is used to query a child entity, and template instantiation are childs entities of the primary template. <br><br>It would also not be difficult to allow the turbofish in front of every templates parameter list, for consistency. E;g. : <br><br>```<br>template &lt;int N&gt; struct type{};<br>type::&lt;0&gt; x; // not needed, but ok<br>```<br><br>Would this create any conflicts with the current C++ grammar ? <br></div></div></div></blockquote><div><br></div><div>What would you do for member function calls? For instance, today&#39;s &quot;x.template get&lt;0&gt;()&quot; becomes... ?</div><div><br></div><div>Barry<br></div></div></div>
</blockquote></div>
-- <br>
Std-Proposals mailing list<br>
<a href="mailto:Std-Proposals@lists.isocpp.org" target="_blank">Std-Proposals@lists.isocpp.org</a><br>
<a href="https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals" rel="noreferrer" target="_blank">https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals</a><br>
</blockquote></div>

