>>>>> "Guido" == Guido van Rossum <guido at python.org> writes: Guido> <intermezzo> Guido> In a different thread I mentioned a design principle for Guido> which I have no catchy name, but which has often helped me Guido> design better APIs. One way to state it is to say that Guido> instead of a single "swiss-army-knife" function with Guido> various options that choose different behavior variants, Guido> it's better to have different dedicated functions for each Guido> of the major functionality types. So let's call it the Guido> "Swiss Army Knife (...Not)" API design pattern. I call the idea the 80/20 Split, or 'Convenience Functions'. You have a powerful, highly generalized function that can do most anything, and has an interface to prove it. Then, a collection of 'Convenience Functions' to constrain that "Swiss Army Knife" to handle 80% of the use-cases, while still letting Ye Power User dig a little deeper. The challenge is to keep the Convenience Function population low, so that you don't arrive at 8,020 different functions in the interface. Go, Python! Chris
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4