Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 10 13:00:26 PDT 2014
On 10/10/2014 07:52 PM, Steven Schveighoffer wrote:
>
> I think leaving this to a lint tool basically is as good and effective
> as doing nothing. It's not a compromise at all.
So the goal is more to help D beginners who would add a const to the
return type
const int foo();
thinking it will work like
const int x;
rather than to improve readability.
It still makes a lot sense to update all our documentation and the style
guide. Any volunteer for the latter?
Let's talk to Brian whether dfix would be able to do the rewrite
automatically.
https://github.com/Hackerpilot/dfix/issues/1
More information about the Digitalmars-d
mailing list