Boost logo

Boost :

From: Reid Sweatman (reids_at_[hidden])
Date: 1999-08-17 16:03:04


>
> Yes, and that is a very conscious design decision. These classes are
> very low-level. So like built-in types, they don't default
> initialize the value. Same rationale as for the built-in types.
> Efficiency does count here. These things often appear in structs of
> which huge buffer arrays for I/O are constructed, and we don't want
> those initialized.
>
> Remember that bin/ubin are used almost exclusively for trafficking
> with the outside world via some I/O mechanism.
>
> Now if lots of people complain, the initialization polity could
> change. So people who think these classes should default initialize
> should speak up! Otherwise they will stay the way they are.
>
> Thanks for bring this up; it is the kind of design decision that
> needs to be widely exposed to the light of day. In general it is
> certainly better to default initialize.

How about including an initializer parameter that defaults to false, in the
same manner as allocators in container constructors?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk