Why is `scope` planned for deprecation?

Manu via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 13 19:20:32 PST 2014


On 14 November 2014 09:28, deadalnix via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Thursday, 13 November 2014 at 10:32:05 UTC, Manu via
> Digitalmars-d wrote:
>>
>> I don't think this proposal has issues with that.
>> The thing at the root of the call tree is the 'owner'. Nothing can
>> escape a scope call-tree, so the owner or allocation policy doesn't
>> matter, and that's the whole point.
>
>
> That is way to define ownerhsip so that is not a rebutal of my
> comment. This makes assumption about ownership, that we may or
> may not want;
>
> I think the proposal is sound overall (I haven't try to explore
> all special cases scenarios, so it is a reserved yes for now) but
> going forward with this before defining ownership is not a good
> approach.

I'm super happy your on board with this. You're often a hard sell :)

What about the definition of 'ownership' do you find problematic?
It's clear we're not going to get multiple pointer types (read: owner
types) like in Rust... so then ownership strategy will probably remain
fairly arbitrary.

The point of scope seems to be precisely to set the problem of
ownership aside. That leaves ownership at the root of the call-tree to
remain being managed however the user likes.

Once we have scope, then we can have meaningful implementations of
things like a unique pointer, and finally approach efficient RC.
Personally, it has proven to be the most inhibiting barrier to further
development in most areas I care about left.


More information about the Digitalmars-d mailing list