suggested improvements to D (Swap Operator)
Xinok
xnknet at gmail.com
Mon Jan 8 21:49:02 PST 2007
Warren D Smith Wrote:
> a <--> b;
> swaps a and b, same as making a tempvar t and then t=a; a=b; b=t;
> As was pointed out by Robert W. Floyd ages ago, in his Turing award
> lecture (but nobody listened) this comes up so
> often it is worth having special syntax for it.
A few simpler symbols:
<-> I think this would work best
>< Simpler, but the developer could possibly confuse this for another symbol
:: I think this is a good symbol, except it can be confused with C's scope operator
AFAIK, D makes no use of any of these.
More information about the Digitalmars-d
mailing list