writeln, UFCS and flip
Tyro[17]
nospam at home.com
Fri Apr 26 13:09:43 PDT 2013
On 4/26/13 8:59 AM, bearophile wrote:
> 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)
I would expect this to be called reverse
> While flip2 does:
>
> flip2!foo(a, b, c) === foo(b, a, c)
> flip2!foo(a, b, c, d) === foo(b, a, c, d)
and this rotate....
Why flip in the first place?
> Bye,
> bearophile
More information about the Digitalmars-d-learn
mailing list