Different API
←Older revision | Revision as of 07:16, 2 August 2013 | ||
Line 85: | Line 85: | ||
=== Different [[API]] === | === Different [[API]] === | ||
- | The important thing is that the choice of modifiers can turn the [[API]] into something completely else. Boths [[API]]s can be useful in certain situations, but one shall be aware that they are completely different. It is not necessary to [[EliminateFuzzyModifiers]] all the time, but remember to | + | The important thing is that the choice of modifiers can turn the [[API]] into something completely else. Boths [[API]]s can be useful in certain situations, but one shall be aware that they are completely different. It is not necessary to [[EliminateFuzzyModifiers]] all the time, but remember to perform such mental exercise in your mind at least. Only then you'll see what kind of [[API]] you are in fact giving to your users. |
In the particular ''Arithmetica'' example the intention very likely is (especially in the light of future optimization suggested in [[AlternativeBehaviour]]) to support just summing numbers. Computing ''factorial'' is a misuse, not a use case. In such case, one wants to call the ''defaultSumAll'' and ''defaultSumTwo''. | In the particular ''Arithmetica'' example the intention very likely is (especially in the light of future optimization suggested in [[AlternativeBehaviour]]) to support just summing numbers. Computing ''factorial'' is a misuse, not a use case. In such case, one wants to call the ''defaultSumAll'' and ''defaultSumTwo''. |