Very limited shared promotion

Manu turkeyman at gmail.com
Tue Jun 18 23:30:07 UTC 2019


On Wed, Jun 19, 2019 at 7:00 AM Ola Fosheim Grostad via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On Tuesday, 18 June 2019 at 09:01:47 UTC, Manu wrote:
> > The access function returns a scoped lock object with a ref
> > count. You may take many read ref's, a write access has a
> > maximum of 1 ref. You may not take a read and a write lock at
> > the same time.
>
> But, you could take the address of an attribute or object and
> retain it?  So this is only by convention? Or is the type system
> able to ensure this?

`scope` has a lot to say in this whole space; it must prevent escaping
references that are only intended to have a finite life. We may reach
limitations with `scope` today and need to make improvements, but
that's fine. Some limitations in this space are fine to work
through... but even in lieu of watertight solutions, we can make
working solutions which are very helpful and hard to break unless you
deliberately go out of your way to do so.

The worst thing that happens is that we stop making progress because a
limitation of this sort inhibits development on other axiis. We're
often too timid, and it hurts D's velocity immensely.


More information about the Digitalmars-d mailing list