FP

Functional Programming, Continued

Comments are moderated. It may take a few minutes before your comment appears.
Markdown is supported in your comments.

Not everything can be flattened, a work around is needed in those cases. The natural inclination is to make a dictionary or object bucket to hold multiple flags. This makes the argument lists short, but now every function in the chain has to deal with a large configuration object. Verifying this object is correct/complete is annoying, as is having to mock up a bunch of settings just to test one function. The function calls will be shorter, but using buckets is just as unwieldy as the original long argument list. Don't hide arguments in buckets, it is ultimately a wash. The one exception would be GUI toolkits where every call could potentially take dozens of arguments. Internally these put a catchall **kwargs into every function declaration and then pass that bucket of assorted keywords onward to every single function call. These are a pain to debug. If you are lucky, the keyword is unique and greppable.

Name:
Mail: (not shown)

Please type this: