[Issue 7177] $ should forward to length by default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 24 14:51:47 PDT 2013


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



--- Comment #49 from Andrei Alexandrescu <andrei at erdani.com> 2013-03-24 14:51:44 PDT ---
> I apologize, but this isn't clear to me. I understand the what/why of the goal,
> but I don't understand the how? Is it the compiler that is translating $ to
> length?

Yes.

>Then if so, how does "hasLength!T" come into play?

Whenever I wrote "hasLength!T" I meant "The expression (expr).length exists for
expr of type T".

> Or are we doing this "via" the compiler as a workaround until we can implement
> opDollar as non-member? (since you mentioned the possibility of allowing
> non-member operators)

I'm thinking of putting this decision in the compiler for now, it's the least
committal change.

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