[Issue 7177] $ should forward to length by default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 21 13:15:40 PDT 2013


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



--- Comment #32 from Steven Schveighoffer <schveiguy at yahoo.com> 2013-03-21 13:15:39 PDT ---
(In reply to comment #31)
> Needing to state in the template constraint that a type supports syntax sugar
> appears to be sub-optimal at best. (Whether or not it is used will usually be
> an implementation detail.) IMO adding opDollar using UFCS makes the most sense.

I think the mistake here is the assumption that $ is syntax sugar.  opDollar is
a function, and is not required to return length, otherwise we wouldn't be
having this discussion.

A more semantically named trait would be hasEnd.

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