Skip to content
Prev 345724 / 398502 Next

Fine controlling "three dots" argument dispatch to functions with identical argument names

You have some interesting ideas about what makes for improvements in parameter interfaces. Wrapping the arguments into a list is like creating an object to represent all of them, except that you don't have the benefits of a class to go with that cognitive shift. And if making classes to hold parameters were appropriate wouldn't you have already done so in the foo and bar interfaces? That is a heavyweight approach that doesn't always make sense.

I agree with Duncan that each time you define a function you are defining an interface that should stand on its own... the user should be able to associate unique names with unique behaviors. From this perspective, your reluctance to define a unified set of uniquely-named parameters for each of foobar and (and apparently foo) seems illogical.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
On November 16, 2014 8:42:20 AM PST, Janko Thyson <janko.thyson at gmail.com> wrote: