[Issue 7177] $ should forward to length by default
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 21 18:49:58 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7177
--- Comment #35 from Steven Schveighoffer <schveiguy at yahoo.com> 2013-03-21 18:49:56 PDT ---
(In reply to comment #34)
> opDollar is syntax sugar. I do not think there is a halfway decent API where
> opDollar is not an alias to a more aptly named member.
Maybe true. But maybe that's only true because opDollar didn't work for a long
time.
What about an infinite range where the "end" is not really defined, but you
need something to say that the upper bound is unbounded?
would that have a use case besides being used in slicing?
> However, why does it even make sense to make opDollar denote end? There is no
> analogue for begin.
>
> m[m.begin()..m.end()]
> ...
> m[m.begin()..$]
> ...
I suggested it, it was shot down. Walter seems convinced that 0 fills that
role despite all attempts to explain.
http://forum.dlang.org/post/op.vco5zwhreav7ka@localhost.localdomain
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list