Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function
Lionello Lunesu via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 13 07:18:51 PDT 2014
On 09/10/14 17:32, francesco cattoglio wrote:
> On Thursday, 9 October 2014 at 08:50:52 UTC, Martin Nowak wrote:
>> Kenji just proposed a slightly controversial pull request so I want to
>> reach out for more people to discuss it's tradeoffs.
>> It's about deprecating function qualifiers on the left hand side of a
>> function.
> I'm all for it
>
>> Then at some future point we could apply the left hand side qualifiers
>> to the return type, e.g. `const int foo();` == `const(int) foo();`
> I know it's not happening anytime soon, but I'm against this second
> idea. This will be an extra annoyance when "porting" old D code to a new
> version. Just removing the currently ambiguous attribute on the left
> should be plenty. No need to try to mimic C in this regard.
+1
More information about the Digitalmars-d
mailing list