What's missing from Phobos for Orbit (package manager)

Walter Bright newshound2 at digitalmars.com
Thu Feb 14 02:00:20 PST 2013


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.



More information about the Digitalmars-d mailing list