[Issue 8381] Uniform function call syntax (pseudo member) enhancement suggestions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 12 10:50:59 PDT 2012


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



--- Comment #5 from Tommi <tommitissari at hotmail.com> 2012-07-12 10:50:58 PDT ---
One small point I forgot to mention about my lowering proposal, which is that
besides adding static pseudo-member functions, you can also add types. For
example:

struct WrapInt
{
    int m_value;
}

template ValueType(T)
    if (is(T == WrapInt))
{
    alias int ValueType;
}

void main(string[] args)
{
    WrapInt.ValueType value = 12;
 // gets lowered into: 
 // ValueType!WrapInt value = 12;
}

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