Length should be a property. When I filed my initial bug report, there was no such thing as @property. If that fixes this bug, them IMHO it's fixed.<br><br><div class="gmail_quote">On Tue, May 4, 2010 at 3:28 PM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:andrei@erdani.com">andrei@erdani.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I think the length should be a property.<br><font color="#888888">
<br>
Andrei</font><div><div></div><div class="h5"><br>
<br>
Masahiro Nakagawa wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi list,<br>
<br>
This post is my first post at Phobos ML :)<br>
<br>
I have one question about hasLength.<br>
<br>
Current implementation from std.range:<br>
-----<br>
template hasLength(R)<br>
{<br>
enum bool hasLength = is(typeof(R.init.length) : ulong) &&<br>
!isNarrowString!R;<br>
}<br>
-----<br>
This implementation has following issues.<br>
<br>
<a href="http://d.puremagic.com/issues/show_bug.cgi?id=2873" target="_blank">http://d.puremagic.com/issues/show_bug.cgi?id=2873</a><br>
<a href="http://d.puremagic.com/issues/show_bug.cgi?id=3508" target="_blank">http://d.puremagic.com/issues/show_bug.cgi?id=3508</a><br>
<br>
But, hasLength returns true when length method is marked as @property.<br>
<br>
We should fix the above issue or length method should be marked as @property?<br>
If latter, some ranges in phobos are incomplete.<br>
_______________________________________________<br>
phobos mailing list<br>
<a href="mailto:phobos@puremagic.com" target="_blank">phobos@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
</blockquote>
_______________________________________________<br>
phobos mailing list<br>
<a href="mailto:phobos@puremagic.com" target="_blank">phobos@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
</div></div></blockquote></div><br>