News for hackers. Stuff that matters.
Re:Brilliant or insane code? by jasallen on Sunday September 01, 2013 @09:58AM (#6310368)
It is clearer, but uses a fixed number of arguments, so may be unsuitable for some applications.
Re:Brilliant or insane code? by aidos on Sunday September 01, 2013 @04:50PM (#6312101)
The current function has the same restriction. In their case it's in the form of " * 3 ".
Re:Brilliant or insane code? by garethadams on Sunday September 01, 2013 @06:22PM (#6312413)
That `3` can be trivially replaced with a variable in a way that `(i, i, i)` cannot. But still, the refactoring of the iterator into a separate variable is the key step which reinforces that the same object is being passed 3 times
Re:Brilliant or insane code? by luikore on Monday September 02, 2013 @02:22AM (#6313706)
You don't have to use the same function to solve every problem.