Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function
via Digitalmars-d
digitalmars-d at puremagic.com
Sun Oct 12 11:24:13 PDT 2014
On Sunday, 12 October 2014 at 09:29:08 UTC, Joseph Rushton
Wakeling via Digitalmars-d wrote:
> On 11/10/14 11:16, Walter Bright via Digitalmars-d wrote:
>> On 10/10/2014 4:16 PM, Joseph Rushton Wakeling via
>> Digitalmars-d wrote:
>>> I agree with that general sentiment, but doesn't this patch
>>> only deprecate
>>> left-hand-side function attributes?
>>
>> Only some of them, others remain:
>>
>> pure int foo() { ... }
>
> Not good. If LHS function attributes are to be deprecated, it
> really ought to be all or nothing.
Not necessarily. `pure` is a real function attribute, while
`const` applies to the implicit `this` paramater and _not_ to the
function.
More information about the Digitalmars-d
mailing list