std.experimental.collection.functional.slist
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 19 16:06:04 PDT 2015
On 06/20/2015 12:36 AM, Andrei Alexandrescu wrote:
> On 6/19/15 2:23 PM, Timon Gehr wrote:
>> What makes persistent data structures useful is that they provide _value
>> semantics_ for complex data types with _O(1)_ copies and fast updates.
>> (COW has only the first two of those.)
>
> OK, so SList!int should allow mutating individual values, and
> SList!(immutable int) shouldn't? Or does that apply only to objects with
> indirections?
>
> Also, what bearing does this have on deciding whether an SList is
> rebindable or not?
> ...
Rebindability is orthogonal to the functionality. They shouldn't be tied.
E.g., one should not have to jump through hoops when translating code
that uses ephemeral data structures with O(N) duplications to persistent
data structures with O(1) duplications.
More information about the Digitalmars-d
mailing list