Programming

7 thoughts
last posted Jan. 27, 2016, 10:36 a.m.

3 earlier thoughts

0

Taken from: http://stackoverflow.com/questions/4565325/too-many-arguments-for-function

Ways to address too many arguments:

  • Group things (ParameterObject, NamedTuple, ...) - Though that just moves the complexity but it might make things more readable (i.e. rectangle instead of x, y, w, h)
  • Use default values for optional values
  • Split into multiple functions

3 later thoughts