Random Suggestion: Swap Operator <=>?

Ary Borenszweig ary at esperanto.org.ar
Fri Jul 17 22:55:47 PDT 2009


Julian Salazar escribió:
> "Walter Bright" <newshound1 at digitalmars.com> wrote in message 
> news:4A610016.2040104 at digitalmars.com...
>> Ary Borenszweig wrote:
>>> Oh, come on, It's just three lines of code! And it's not *that* 
>>> common. I know it's kind of basic and primitive, but there's a 
>>> standard library function for it. Why add an operator *just* for that?
>>
>> A request for a swap operators comes up now and then in the C/C++ 
>> forums as well. The answer given, which applies to D as well, is that:
>>
>> 1. it is too rarely used to merit a special operator just for it
>>
>> 2. it is handled adequately with library code or even just inlining it
> 
> Well, when was the last time you used "!<="? Ah well, my ignorance of 
> the swap library template has sparked debate.

Don't worry. In this newsgroup *any* topic sparks debate. :-)



More information about the Digitalmars-d mailing list