Migrating to Shared

Sean Kelly sean at invisibleduck.org
Thu May 14 07:33:55 PDT 2009

Steven Schveighoffer wrote:
> I'm thinking this shared thing is going to be only good for small POD, 
> as it's going to be almost untennable to deal with repeating all 
> implementation just because something is shared or not.  And even then, 
> you probably want to copy the POD to non-shared form so you can pass it 
> around.  I don't anticipate anyone making much more than a shared int.

Personally, I anticipate using shared for large global containers almost 
exclusively.  I've never considered the "interconnected web of shared 
objects" idea to be a good one, and building shared into the language 
doesn't change that.  For containers, a range returned by a shared 
container will probably have to hold the lock on that container until it 
is destroyed or shared won't be terribly useful.  I haven't thought 
about this very thoroughly, but that's my initial take on the idea.

More information about the Digitalmars-d mailing list