On Tuesday, 13 October 2015 at 12:40:46 UTC, Ola Fosheim Grøstad wrote:
On Monday, 12 October 2015 at 19:35:34 UTC, Marco Leise wrote:
Wouldn't it be great if everyone took notes of the currently
perceived shortcomings of shared so that there is a pile of
use- and corner-cases to look at for a redesign?

The problem with shared is that shared should not be constant over time, it should be related to behavioural typing/type state.

Synchronization is a temporal factor not a static typing factor.

That said, if you have:

1. writer-ownership as a feature
2. mark variables as "only writable by one owner"

Then the compiler can drop some read locks for the _owning_ thread.

But D does not have ownership as a feature beyond "thread local memory"?

Reply via email to