[phobos] phobos commit, revision 1740

Sean Kelly sean at invisibleduck.org
Fri Jul 9 08:02:26 PDT 2010


Fortunately, we aren't bound by a standards body, so if there turn out to be problems we could just rip it out. 

Sent from my iPhone

On Jul 9, 2010, at 12:02 AM, Jonathan M Davis <jmdavisprog at gmail.com> wrote:

> On Thursday 08 July 2010 23:17:22 Andrei Alexandrescu wrote:
>> On 07/09/2010 12:25 AM, Jonathan M Davis wrote:
>>>> Also added specialization of Array for bool that stores one bit per
>>>> element.
>>> 
>>> _Please_ tell me that's optional in some manner. I don't know
>>> _anyone_ who uses vector<bool>  in C++ _precisely_ because of this
>>> optimization. I don't think that I've ever talked to anyone who
>>> thought that vector<bool>  being special in that manner was a good
>>> thing.
>> 
>> I am well aware of vector<bool>'s problems and designed Array!bool very
>> carefully to avoid each and all of them.
>> 
>> Andrei
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> 
> Well, I would have thought that you'd have been aware of the issue, but since 
> I've never heard of anyone thinking that doing anything other than just making 
> vector<bool> function like it would with vector<int> or vector<string> or 
> whatever, I was very surprised to see that you would consider doing something 
> similar with Array!bool. Now, if you're sure that you've managed to avoid the 
> issues that exist with vector<bool>, then that's fine, but I'd hate for D to have 
> the same problems with Array!bool that C++ has with vector<bool>.
> 
> - Jonathan M Davis
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list