[OT] Finding longest documents
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Oct 15 18:50:41 PDT 2008
Benji Smith wrote:
> Andrei Alexandrescu wrote:
>> In my humble opinion, collections APIs are the poster-child of the
>> misguided joy of the beginnings of object-orientation, right next to the
>> mammal isa animal example. Organizing collections in hierarchies is of
>> occasional benefit, but the real benefit comes from decoupling
>> containers from algorithms via iterators, the way the STL did. The
>> savings there were that an O(m * n) problem has been solved with writing
>> O(m + n) code. Container hierarchies do not achieve such a reduction
>> unless efforts are being made that have little to do with hierarchical
>> organization. At most they factor out some code in the upper classes,
>> but hierarchies help when types have many commonalities and few
>> difference, and that is very rarely the case with containers.
>
> Nonsense.
I know you're going to hate this, but I'm unable to follow through with
this discussion. There is much background and many aspects to discuss,
and I simply can't afford the time. Since not too long ago it has dawned
on the programming community that OOP is not all it's cracked to be, and
that there are quite a few amendments and qualifications that need to be
made to what once seemed to be very attractive principles. But such
developments are quite recent, and they may sound downright heretic and
indeed nonsensical to many. That's why there's need for a lot of
explaining.
There's a book I do recommend though to bring some good info on the
subject: Agile Software Development by Robert Martin. The book is good,
and for this particular subject I recommend Chapter 10.
Andrei
More information about the Digitalmars-d
mailing list