[Issue 12931] Make const, immutable, inout, and shared illegal as funtion attributes on the left-hand side of a function

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 23 21:15:46 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12931

--- Comment #8 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Jonathan M Davis from comment #6)
> The fact that public, private, static, etc. can't go on
> the right completely goes against the entire argument for why const is
> allowed on the left, and as soon as I figured that I out, I was pretty mad
> that we'd ever agreed to let const be on the left.

BTW, I think this is allowed for historical reasons -- attributes on the right
did not exist before a certain version. On the left was the only way early on.
I can't remember which version allowed it on the right, but there was a debate
about it on the NG.

--


More information about the Digitalmars-d-bugs mailing list