[Issue 7177] $ should forward to length by default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 21 09:22:30 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=7177



--- Comment #22 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-03-21 09:22:30 PDT ---
> I don't think we need to require opDollar with hasSlicing, why would you think
> that?

Because if you don't, then you can never use $ when slicing a range. And
really, isRandomAccessRange should require that $ work with finite ranges for
the same reason. As it stands, you pretty much can't use $ in generic code.
It's only good for arrays, because you can't count on it working for anything
else. The appropriate range templates must be able to require them for us to be
able to use them, and if we change them to require opDollar without this
enhancement request, then it's going to break a lot of code.

-- 
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