in reply to Re^3: Use reference for functions in functions
in thread Use reference for functions in functions
I beg to differ. I found them very useful yesterday when I was rewriting a function from having 2 arguments to having 3. (and saving some lookups on the way) With proptotyping I was able to differentiate between both functions and have the code still functioning for my coworkers while I was optimizing the function. (and after rewrinting all function calls drop the old 2 argument sub)
When you want to have the same function react differently based on the amount of arguments, by example while rewriting the function, it's useful. (unless you start shipping hashes/arrays and stuff like that to functions, then it gets interesting and to be honest a lot more fun)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Use reference for functions in functions
by AnomalousMonk (Archbishop) on Feb 27, 2013 at 16:06 UTC | |
by T_I (Novice) on Feb 28, 2013 at 09:05 UTC |