http://wiki.dlang.org/DIP25 has been preliminarily approved for 2.067
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jan 16 14:13:44 PST 2015
On 1/16/15 4:41 PM, Andrei Alexandrescu wrote:
> Please help us work the kinks out! Walter will be proceeding with the
> opt-in implementation for quicker pipelining.
>
> http://wiki.dlang.org/DIP25
I was about to complain because I remember not liking that DIP, but I
see you removed inout as the notation, opting for return instead. Looks
good now!
One thing I would note: in "Types of Result vs. Parameters", I think it
should stay this way. Simple explanation is: IFTI/auto returns.
We have a very similar situation with inout. Originally, I insisted that
inout only was valid on a parameter if it was also designated on the
return. This kind of makes sense. But it caused issues with templates,
because inout could be deduced by IFTI, and then it wasn't on the
return. We have now fixed the compiler so inout reduces to const if not
specified on the return.
I can potentially see a situation like this:
auto fun(T)(return ref T x)
Where the auto deduces to something that couldn't possibly match T or
any piece of it. Causing this function to error just because of a type
mismatch is the wrong move.
-Steve
More information about the Digitalmars-d
mailing list