Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 1999-08-17 16:45:54

At 02:03 PM 8/17/99 -0700, Reid Sweatman wrote:

>> Yes, and that is a very conscious design decision. These classes
>> 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
>> which huge buffer arrays for I/O are constructed, and we don't
>> 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
>> 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?

Would the added complexity be worth it? I don't see a lot of people
using integer classes which are the same as the built-in's except for
initialization. I'm just not sure there is any real need.


Boost list run by bdawes at, gregod at, cpdaniel at, john at