std.container.RedBlackTree versus C++ std::set

Dan dbdavidson at yahoo.com
Fri Feb 15 10:14:21 PST 2013


On Thursday, 14 February 2013 at 20:53:26 UTC, Jonathan M Davis 
wrote:
>
> And Walter and Andrei both seem to think that having expensive 
> postlbits is a
> design mistake. The range stuff sort of tries to support it 
> with the move*
> primitives, but Andrei's been wanting to argue for just 
> assuming that
> postblits are cheap. And Walter was actually arguing at one 
> point for making
> it illegal (probably by getting rid of postblit all together - 
> I don't
> remember the details). Plenty of the rest of us don't agree, 
> but to some
> extent, it is true that having an expensive postblit is asking 
> for it. On a
> related note, we still need a solution for dealing with const 
> postblits
> (probably be introducing copy constructors - IIRC Andrei was 
> considering
> phasing out postblits in favor of copy constructors, which 
> would be
> unnecessary, but we do need a way to deal with deep copying 
> const structs
> which hold reference types which need to be deep copied.
>

When you say things like "Andrei was considering phasing out 
postblits..." I get nervous. Can we please have some comments 
from Andrei/Walter about what the plans are? I'm not asking for 
the ultimate solution - just to know the general direction and 
where this issue stands at present. Is there anything any of us 
can do to help move this forward?

Regarding replacing expensive postblits with copy constructors - 
how does that help? The expense will remain the same - if you 
need a transitive copy, you need a transitive copy.

Thanks
Dan




More information about the Digitalmars-d-learn mailing list