Why is `scope` planned for deprecation?

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 13 22:11:05 PST 2014


On Friday, 14 November 2014 at 03:20:42 UTC, Manu via 
Digitalmars-d wrote:
> 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?

I don't find it problematic. However, the concept of burrowing 
(what we do with scope in that proposal) makes assumptions about 
ownership. So I'd like to see ownership addressed.

Ultimately, we can decide that ownership is loosely defined, but 
that may have very important consequences on the possibility - or 
not - to introduce ownership. I think ownership is an important 
concept to have to get the gc world and the non gc worlds 
interact nicely (which should be a big interest of yours as well).

> 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.
>

I think it make sense to have something for ownership. The error 
of rust wasn't going that road, but going in that road 100%, 
which come at a cost at interface level which is too important. A 
simpler ownership system, that fallback on the GC or unsafe 
feature when it fall short.

I'm confident at this point that we can get most of the benefit 
of an ownership system with something way simpler than rust's 
system if you accept to not cover 100% of the scenarios.

> 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.

Yes, that is absolutely necessary to have safe RC, and a great 
tool to make it more efficient.

I'm not fan of unique as this is, IMO, a dumbed down version of 
what ownership can be, with no real upside.


More information about the Digitalmars-d mailing list