On 2013-10-10 17:34:47 +0000, Sean Kelly <[email protected]> said:

On Oct 10, 2013, at 4:17 AM, Michel Fortin <[email protected]>
wrote:

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

Good article.  But why didn't you mention core.sync?  It has both a
Mutex and a ReadWriteMutex (ie. shared_mutex).

Because that would have required a ton of explanations about why you need casts everywhere to remove shared, and I don't even know where to begin to explain shared semantics. Shared just doesn't make sense to me the way it works right now.

The examples in C++ are much clearer than anything I could have done in D2. I don't want to have to explain why I have to bypass the type system every time I need to access a variable. I'll add that I'm coding in C++ right now so it's much easier to come up with C++ examples.

That said, it might be a good idea to add a note at the end about core.sync in case someone wants to try that technique in D.

--
Michel Fortin
[email protected]
http://michelf.ca

Reply via email to