Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function
Joseph Rushton Wakeling via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 9 15:29:21 PDT 2014
On 09/10/14 13:38, monarch_dodra via Digitalmars-d wrote:
> I'm not really sure about the: "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 don't think it buys us anything, except maybe silently changing semantics of
> code that hibernated through the deprecation process.
Besides,
const int foo() const
{
...
}
is fairly ambiguous syntax to my eyes.
const(int) foo() const
{
...
}
is less so.
More information about the Digitalmars-d
mailing list