Random Suggestion: Swap Operator <=>?
Rainer Deyke
rainerd at eldwood.com
Thu Jul 16 18:00:59 PDT 2009
Julian Salazar wrote:
> I know that the chance of it actually being implemented is close to nil,
> but even a template in the standard library for it would be cool (or did
> I miss something?). Or am I being deluded? :)
Swap is a common operation that belongs in the standard library, but I
don't think it merits its own operator. (I think it's generally safe
and efficient to perform a bitwise swap on structs in D, even if those
same structs are expensive to copy, so swap definitely deserves language
support.)
--
Rainer Deyke - rainerd at eldwood.com
More information about the Digitalmars-d
mailing list