[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
STL use of not (was: Re: Alpha...)
---Hary Walsh <hwalsh@tellabs.ie> wrote:
>
> >>>>> "Kasper" == Kasper Peeters <t16@nikhef.nl> writes:
>
> Kasper> At this point, I would again like to make a strong
> Kasper> recommendation in favour of the standard library,
> Kasper> especially since g++ now has a good implementation of
> Kasper> 'string' and handles the basic STL containers ('vector',
> Kasper> 'list' and so on) very well.
>
>
> Warning about STL. In situations where many STL containers are
> needed, it is customary to set a more granular preallocaiton buffer
> size. This reduces memory wastage considerably. However in the C++
> draft the methods for manipluating allocator sizes have been removed.
>
> I personally feel that STL is not necessary. We should be able to
> short list the containers we need ( vector, map, pair, string ) and
implement
> them ourselves. If portability is an issue, we can keep the
interface
> of STL.
>
Liberal use of STL may result in a real code explosion with some of
the dumber C++ compilers. They just do a piss-poor job with template
generation, and your code size can grow exponentially with little
gain in quality.
Of some of the classes I could offer, I have a reference counting
String class which has been used by others. It works fairly well,
although, it could probably use a bit of polish. It has been tested
in several different applications. I also have a implementations of
lists and a hash table that I could offer. I have implemented a
pair of classes for reference counting. Probably some others, but
I think those were what was mentioned on the short list.
OTOH, these classes are not standard and some of them use templates
as well.
Anyway, I'm not pushing an agenda -- just wanted to make the offer.
===
Kultarr
_____________________________________________________________________
Sent by RocketMail. Get your free e-mail at http://www.rocketmail.com