writeln, UFCS and flip

bearophile bearophileHUGS at lycos.com
Fri Apr 26 05:59:22 PDT 2013


ixid:

> flip2 is the more general and useful function with new 
> functionality so there's no need for what was flip and we 
> should call the new function 'flip'.

I don't agree. Maybe you are missing something.

I expect a function named "flip" to do:

flip!foo(a, b, c) === foo(c, b, a)
flip!foo(a, b, c, d) === foo(d, c, b, a)

While flip2 does:

flip2!foo(a, b, c) === foo(b, a, c)
flip2!foo(a, b, c, d) === foo(b, a, c, d)

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list