Something needs to happen with shared, and soon.

Michel Fortin michel.fortin at michelf.ca
Sun Nov 11 17:48:02 PST 2012


On 2012-11-11 18:46:10 +0000, Alex Rønne Petersen <alex at lycus.org> said:

> Something needs to be done about shared. I don't know what, but the 
> current situation is -- and I'm really not exaggerating here -- 
> laughable. I think we either need to just make it perfectly clear that 
> shared is for documentation purposes and nothing else, or, figure out 
> an alternative system to shared, because I don't see shared actually 
> being useful for real world work no matter what we do with it.

I feel like the concurrency aspect of D2 was rushed in the haste of 
having it ready for TDPL. Shared, deadlock-prone synchronized 
classes[1] as well as destructors running in any thread (thanks GC!) 
plus a couple of other irritants makes the whole concurrency scheme 
completely flawed if you ask me. D2 needs a near complete overhaul on 
the concurrency front.

I'm currently working on a big code base in C++. While I do miss D when 
it comes to working with templates as well as for its compilation speed 
and a few other things, I can't say I miss D much when it comes to 
anything touching concurrency.

[1]: http://michelf.ca/blog/2012/mutex-synchonization-in-d/

-- 
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca/



More information about the Digitalmars-d mailing list