On 2/14/2013 12:32 AM, bearophile wrote:
Walter Bright:
The trivial ones should not be added to Phobos,
The situation is not that simple.
The trouble is, where do you stop adding trivia? How about this one:
T addThree(T t) { return t + 3; }
?
A good interface design has the *minimum* number of functions out of which
anything else can be built. Functions that are recombinations of other functions
in the same interface do not belong in that interface.
It's tempting to create kitchen sink abstractions, but they really are a bad
idea.