I've always been of the opinion that you should generalize your functions only when it's required and specialize when it is only being used for one use.
This is under the assumption that you do not see any other use for the function in the foreseeable future. If you know you'll need it for other things later then I feel you should generalize just to save yourself the trouble later on. But generalizing without any foreseeable future case but making the assumption that there might be seems...
Generalization / Specialization. When and where???
from Programming https://ift.tt/2ZzquMh
via IFTTT
0 Comments