Immutable Red-Black trees

bearophile bearophileHUGS at lycos.com
Mon Nov 25 17:31:10 PST 2013


Craig Dillabaugh:

> What do you mean by an 'immutable' data structure.  The linked 
> article talks about Persistent data structures.  Are these the 
> same thing?
>
> When I saw "Immutable" I figured it didn't support 
> insertion/deletion - which would sort eliminate the need for a 
> Red-Black tree anyways.

In those articles Bartosz is implementing in C++11 the immutable 
data structures from the book by Okasaki. Immutable doesn't mean 
you can't change them :-) It means you can't modify the single 
data items, and you have referential transparency.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list