std.typecons.Rebindable

Jack Applegame japplegame at gmail.com
Sun Feb 2 08:14:59 PST 2014


> What's the point of using Rebindable for a non-[class|interface]
> type? They are the only type where it makes sense, since you
> can't give different qualifiers to the handler and the object.
>
> I'm surprised it even handles arrays at all. As a matter of 
> fact,
> the documentation says:
> "However, Rebindable!(T) does not compile if T is a non-class
> type."
> If arrays worked, I think it was buggy behavior. There's no 
> sense
> in having a Rebindable array.
Hmm. I need to pass an unique associative array to several 
threads. If this array has immutable elements, but isn't 
immutable itself, then what happen if one of threads adds or 
removes element from array?
Associative arrays is some kind of hash-table. Adding alements in 
one thread can cause undefined behaviour in other thread.
Am I wrong?


More information about the Digitalmars-d-learn mailing list