The "no gc" crowd
Michel Fortin
michel.fortin at michelf.ca
Thu Oct 10 11:27:14 PDT 2013
On 2013-10-10 17:34:47 +0000, Sean Kelly <sean at invisibleduck.org> said:
> On Oct 10, 2013, at 4:17 AM, Michel Fortin <michel.fortin at michelf.ca>
> 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
michel.fortin at michelf.ca
http://michelf.ca
More information about the Digitalmars-d
mailing list