OK. Fair enough.

Just thinking out loud here, but I've seen some languages experimenting with 
tracking ownership in the type system.

Is it possible to prevent aliasing by requiring that all pointed-to objects 
have an owner, and you can only modify an
object by following it's ownership chain?

Googling for "ownership types aliasing" returns some interesting papers, but 
the research looks far from settled.

-- Noel Grandin

Graydon Hoare wrote:
> On 03/06/2011 5:16 AM, Noel Grandin wrote:
>> Hi
>>
>> Maybe I came late to the discussion, and I've missed this bit, but has it 
>> been discussed already that the functional
>> language solution is off the table?
>>
>> By functional language solution, I mean that there is no reference operator, 
>> and all arguments are passed "by copy"
>> semantically.
>
> Yeah. That's mostly off the table. Sorry. We started there years ago but have 
> long since moved to accept the
> requirement of being able to differentiate shared-reference and copy as 
> concepts.
>
>> This passes the performance burden from the programmer to the compiler, but 
>> allows the compiler to grow more
>> intelligence incrementally.
>
> On a more general note, it is an explicit anti-goal to have performance 
> depend heavily on a clever compiler.
> Performance should (within some moderate set of "totally obvious, possibly 
> language-mandated" optimizations) be
> broadly predictable whether or not the compiler does something clever.
>
> -Graydon
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to