On 4/23/13 2:32 PM, Manu wrote:
On 24 April 2013 04:01, Andrei Alexandrescu <[email protected] <mailto:[email protected]>> wrote:On 4/23/13 1:57 PM, Steven Schveighoffer wrote: On Tue, 23 Apr 2013 13:33:31 -0400, Andrei Alexandrescu <[email protected] <mailto:[email protected]>__> wrote: Our intent is to make "ref" always scoped and reserve non-scoped uses to pointers. So no more returning ref? If we can't return ref, ref has failed. (This is what makes the entire thing difficult btw.) I think the key that's not in this DIP is that it should also return 'scope ref' to maintain the safety. This brings the proposal in-line with your plans, except the safety is explicit, and the option is available to the programmer.
We prefer to simplify. Use ref safely for scoped pass-down of resources, use pointers for unrestricted escapes. What you see as "offering an option" I see as "adding a burden".
Making 'safe' ref the default is a major breaking change.
How do you assess the size of the breakage? Andrei
