[Issue 7177] $ should forward to length by default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 21 10:47:04 PDT 2013


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



--- Comment #26 from Steven Schveighoffer <schveiguy at yahoo.com> 2013-03-21 10:47:03 PDT ---
(In reply to comment #25)
> I really don't think that it makes sense to define ranges with slicing which
> don't have opDollar or finite random-access ranges which don't have opDollar.

Then why is this necessary?  If it only makes sense to define opDollar, then it
will be defined, and you can use it.

> And having hasOpDollar or supportsOpDollar just complicates ranges even
> further.

What?  How does it do anything to make ranges more complex?  If anything,
adding it to isRandomAccessRange makes them more complex, because now ranges
that previously satisfied that trait may now not satisfy it.  Defining a new
trait does not make anything more complex, nothing is required to implement a
new trait, because nothing currently uses that trait.  No more changes are
required to satisfy a new hasOpDollar trait than are required to satisfy an
isRandomAccessRange trait that now requires opDollar.  In fact the same code is
required.

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