News for hackers. Stuff that matters.
Re:How to Swap two numbers without temp variable in Java by dietrichepp on Monday February 25, 2013 @08:08AM (#5278760)
What makes it awesome? It seems like a way to take something simple (swapping variables) and write it in a complex way (three operations) so that neither the humans nor the compilers reading it will know what is going on.

Real temporary variables are clearer for both humans and machines.

Re:How to Swap two numbers without temp variable in Java by imd on Tuesday February 26, 2013 @02:55PM (#5288054)
Read crntaylor's explanation of this via group theory: https://news.ycombinator.com/item?id=5278915

So this is awesome insofar as you find things like group theory awesome (I did). But like he says, if you find this awesome to use in production code, that's a horse of another color.

Re:How to Swap two numbers without temp variable in Java by kombinatorics on Monday February 25, 2013 @09:18AM (#5279051)
What's the point of finding the trillionth number in pi? The same is implied here. We do things, just because we can.