<div class="gmail_quote">On Sat, Jun 22, 2013 at 4:15 PM, Timon Gehr <span dir="ltr"><<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 06/23/2013 12:55 AM, H. S. Teoh wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Sat, Jun 22, 2013 at 10:57:53PM +0200, Jacob Carlborg wrote:<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2013-06-22 18:40, H. S. Teoh wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yeah that one made my eyes glaze over. I still have trouble wrapping my<br>
brain around the strange syntax of is(), and why its diverse uses have<br>
been shoehorned into deceptively similar syntax.<br>
</blockquote>
<br>
Isn't quite a lot of the is-expression features undocumented?<br>
</blockquote></div></div>
[...]<div class="im"><br>
<br>
Really? Well, even if so, the cases that *are* currently documented<br>
share a lot of syntax, but aren't necessarily related in a way that the<br>
syntax might imply. This is very confusing. One example that comes to<br>
mind is using is(T _ == U) instead of is(T == U). I'm guessing most<br>
people don't even know what the difference is, or why a dummy identifier<br>
_ has to be added.<br>
<br>
<br>
T<br>
<br>
</div></blockquote>
<br>
It's not a dummy identifier. It introduces _ as an alias to T if used inside a static if condition. Otherwise there is no difference.<br>
<br>
<br>
void main(){<br>
    static if(is(int _ == int)){<br>
        _ x;<br>
    }<br>
    static assert(is(typeof(x)==int));<br>
}<br>
<br>
I don't know what the point of this feature is.<br>
<br>
There used to be the issue that some forms of is were only available when the alias identifier was used. This has been fixed.<br>
</blockquote></div><br><div>if that the case can we add it to <a href="http://dlang.org/deprecate.html">http://dlang.org/deprecate.html</a> (as 'future' deprecation)?</div><div><br></div><div><br></div>