Is the world coming to an end?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Apr 3 13:18:29 PDT 2011


On 4/3/11 2:54 PM, spir wrote:
> On 04/03/2011 09:21 PM, Walter Bright wrote:
>> On 4/3/2011 12:03 PM, spir wrote:
>>> Then, I would rather go (see other post) for a general baseNumber!
>>> template,
>>> that could trivially be aliased as in
>>> alias baNumber!3 base3;
>>> What do you think?
>>
>> I think it'd need some compelling use cases.
>
> Well, like octal!... it's just more general.

There definitely is such a thing as overly general. I ran into that 
quite often while designing and implementing std.algorithm. Some 
generalization are useful and sometimes pleasantly surprising (e.g. 
levenshtein distance on UTF strings) whereas others are just random. I 
try to foster the former kind and dedicate no specific effort to the latter.

Andrei



More information about the Digitalmars-d mailing list