Convenience vs. Flexibility Having recently been involved in a series of design reviews for different API projects, I have come to embrace the following belief:
Every step that is taken towards providing convenience in an API design is a step taken away from providing flexibility.
Now I'm not saying providing convenience is always a bad thing, nor am I saying that providing flexibility is always a good thing. A good example of when to lean towards convenience would be the creation of a helper function that implements code that, if the function didn't exist, would have to be written over and over again. A bad example of when to lean towards convenience would be the modification of generic functionality to meet a specific use case, that prevents the same functionality from being used for a different use case.
11:02:29 AM
|