Purity, @safety, etc., in generic code
deadalnix
deadalnix at gmail.com
Fri Feb 22 10:18:34 PST 2013
On Friday, 22 February 2013 at 17:25:58 UTC, kenji hara wrote:
> 2013/2/23 deadalnix <deadalnix at gmail.com>
>
>> On Friday, 22 February 2013 at 15:32:42 UTC, kenji hara wrote:
>>
>>> Yes, then the B's definition should raise "mutable A.foo() is
>>> not
>>> overridden but hidden in B" (but doesn't because of bug 8366).
>>>
>>>
>> I don't really understand why adding a special case for
>> something that has
>> no real use case.
>>
>
> In old age, it had thrown HiddenFuncError in runtime, and some
> years ago,
> it had been changed to compile-time error.
> It is one of design in D to avoid unintended method hiding
> issue.
>
This whole overload on const (note overload, not override) has
been introduced in the first place to solve problem that inout
now solve in a superior way.
More information about the Digitalmars-d
mailing list