July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
I have implemented that time ago for ShedSkin, here George Sakkis (first answer) suggests how... | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
Or when you need to reorder more than two variables: a, b, c, d = b... | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
Oh, come on, It's just three lines of code! And it's not *that... | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
...if it's available, I'd use swap, because: * I wouldn't have to mention... | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
A more general solution is supporting tuples in the language, then you can do something... | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
...x <- E; The swap operator is really syntactic sugar for the swap function, which can... | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
On Fri, 17 Jul 2009 01:05:09 -0400, Lionello Lunesu <lionello@lunesu.remove.com... | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
And it's already a reality in Perl and MiniD ;) Gaww, it's so nice... | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
Nooooo! That's my imaginary opCmp operator! L. | |||
July 17, 2009 General » Re: Random Suggestion: Swap Operator <=>? | |||
|---|---|---|---|
| |||
Swap is a common operation that belongs in the standard library, but I don't... | |||
Copyright © 1999-2021 by the D Language Foundation