Random Suggestion: Swap Operator <=>?
Michiel Helvensteijn
m.helvensteijn.remove at gmail.com
Fri Jul 17 07:47:38 PDT 2009
Julian Salazar wrote:
> I'm wondering, who here would use a swap operator if it were available?
I have a swap operator in my new programming language:
x <-> y;
It's syntactically consistent with the assignment operator:
x <- E;
The swap operator is really syntactic sugar for the swap function, which can
be overloaded and templated to your hearts desire (as long as each template
type can be automatically deduced by the actual parameters).
So yeah, I'd use it.
--
Michiel Helvensteijn
More information about the Digitalmars-d
mailing list