DIP 1021--Argument Ownership and Function Calls--Final Review
Mike Franklin
slavo5150 at yahoo.com
Thu Sep 19 13:26:30 UTC 2019
On Thursday, 19 September 2019 at 09:42:06 UTC, Walter Bright
wrote:
> > [1]
> https://gist.github.com/PoignardAzur/9896ddb17b9f6d6f3d0fa5e6fe1a7088
>
> I haven't studied that. Is it a 100% solution? I know there's
> one being worked on for C++, but it's an 80-90% solution.
>
> D needs to have a 100%, mechanically checkable, solution.
>
> We have 100% for transitive const and function purity. It's
> hard to get code to pass, but worth it when one succeeds. The
> Ownership/Borrowing solution is 100% which is what is appealing
> about it.
There are two 100% solutions that I am aware of. One is Rust's
borrow checker, which I'm assuming is already familar to all, and
the other is Pony's reference capabilities [1]. As the ownership
and borrowing vision for D is being polished, I think it would be
worthwhile to become familiar with Pony's model even if only to
provide contrast and solidify existing ideas.
Graydon Hoare [2] and Niko Matsakis [3], both rock stars in the
Rust community, provided some interesting commentary on Pony's
model.
[1] -
https://tutorial.ponylang.io/reference-capabilities/reference-capabilities.html
[2] -
https://www.reddit.com/r/rust/comments/34rszb/pony_type_and_memory_safe_language/cqxkmm8/
[3] -
https://www.reddit.com/r/rust/comments/34rszb/pony_type_and_memory_safe_language/cqxvxky/
I'm really excited about where you're going with all of this, but
this DIP does seem like an odd thing to do in isolation from a
complete ownership/borrowing model. It still seems to me that a
complete ownership/borrowing/reference-capabilities solution, in
the general case, would already handle the use cases addressed by
this DIP.
Mike
More information about the Digitalmars-d
mailing list