Where can I find some references concerning when to use options and when to use multiple arguments in designing and writing functions?

Seems most built-in functions have arguments less than 3 and with a large number of options.

Are you confusing at the choice of using arguments or options?

And sometimes too many arguments which are ordered, the bad thing is that we may forget how to pass parameters with the right order. This is saying that, when using options, we don't care the order of options, just pick the ones needed.

Sometimes multiple arguments could be combined to one list argument.

Sometimes multiple arguments are convenient to be implemented into the rough/original demo functions.

Sometimes multiple arguments are more frequently used in some of my short-run functions.

Sometimes options will be added to some of my old functions, and especially long-run functions.

Sometimes options can be well inherited and translated from different functions.

  • $\begingroup$ here could be a start: mathematica.stackexchange.com/a/16615/2448 $\endgroup$ – Stefan Jun 28 '13 at 12:39
  • $\begingroup$ This is asking for opinions which is explicitly not permitted by StackExchange rules. I also think it is too broad a question, another reason for closing it. $\endgroup$ – m_goldberg Jun 28 '13 at 13:01
  • $\begingroup$ @m_goldberg well, where are such questions more suitable to be asked? Actually if someone know one book about this topic? or duplicates discussions about this topic is welcome. Sorry for my ignorance of rules. $\endgroup$ – HyperGroups Jun 28 '13 at 13:11
  • $\begingroup$ You could bring it up in chat. The rules are more relaxed there. $\endgroup$ – m_goldberg Jun 28 '13 at 13:13
  • 3
    $\begingroup$ HyperGroups, I'd like to try to answer this question, but at present it is too unfocused to attempt. You list a number of considerations yourself; listing them back to you would surely not be helpful. Perhaps you could explain exactly where you are having trouble balancing these considerations, with some examples, so there is something concrete to address. $\endgroup$ – Mr.Wizard Aug 26 '13 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.