DIP1000: The return of 'Extend Return Scope Semantics'

Walter Bright newshound2 at digitalmars.com
Fri Jun 11 09:15:34 UTC 2021


On 6/10/2021 10:53 PM, ag0aep6g wrote:
> You can't defend the "first parameter" rule with member functions. If you want 
> to support returning through `this`, you can easily define that without bringing 
> the order of the parameters into it.
> The actual point of the "first parameter" rule is obviously UFCS. You want 
> support a free function `push` that is called via UFCS. `push` is not a member 
> function then.

The whole idea of UFCS is member functions and regular functions are 
interchangeable, hence `this` is the first parameter.


More information about the Digitalmars-d mailing list