Sunday, November 23, 2008
using 'helper' is a cop out
What's the alternative to a helper function? Why would you insert "helper" in to a function name or variable name? Do people write un-"helpful" functions or variables? "helper" seems to imply some sort of slave variable that only minimally contributes to the goal of a piece of code. A "helper" function returns some intermediate step in the guts of a steaming pile of code. Why not name the function/variable according to what it actually does and omit the useless adjective? Or if you're too lazy, just omit the useless clutter of "helper_" -- we already assume that you wouldn't intentionally write unhelpful variable names or function names.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment