DIP69 - Implement scope for escape proof references

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 8 15:05:47 PST 2014


On Sunday, 7 December 2014 at 21:29:50 UTC, Walter Bright wrote:
> My experience with C++ ref as type qualifier is very, very bad. 
> It's a special case EVERYWHERE. Doing type deduction with it is 
> an exercise in a completely baffling set of rules and a 
> different rule for every occasion - Scott Meyers has a great 
> piece on this.
>
> There are probably only a handful of people on the planet who 
> actually understand C++ ref. I wished very hard to avoid that 
> with D ref.

Type qualifier for scope is the wrong tool.

scope(int)[] do not make any sense. The slice cannot outlive its
content. scope as a flag on expressions/symbols is very useful.


More information about the Digitalmars-d mailing list