http://wiki.dlang.org/DIP25

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 3 20:43:04 PST 2015


On 1/3/2015 5:12 PM, Manu via Digitalmars-d wrote:
> I was firmly in support of Marc's design. I'm not sure why it was rejected.
> What were the problems? Why did it become a storage class, other than
> because of fear that it might pervade too deeply if it were part of
> the type?

I felt unaddressed what are the interactions with other scope qualifiers, how 
type deduction works, how would auto work, covariance, how are types like

    int****scope(foo)****

handled, how would generic code get written that used this, name mangling, auto 
returns, etc. A comprehensive spec for it would be much larger. I tried to do a 
more comprehensive spec with DIP69, and it wound giving the impression that it 
was more complex when it was actually simpler. I'm also painfully aware of how 
'simple' C++'s ref appeared and how awful it is in practice.

And lastly, I thought it verbose, such as:

    scope!haystack(string) findSubstring(scope(string) haystack, scope(string) 
needle);

There have been many complaints, including from you, about the existing 
verbosity of function declarations.


More information about the Digitalmars-d mailing list