Final by default?

deadalnix deadalnix at gmail.com
Thu Mar 13 14:20:41 PDT 2014


On Thursday, 13 March 2014 at 20:21:51 UTC, monarch_dodra wrote:
> On Thursday, 13 March 2014 at 19:38:20 UTC, Dmitry Olshansky 
> wrote:
>> 13-Mar-2014 21:52, monarch_dodra пишет:
>>> So maybe the issue could be solved by educating to always 
>>> type (by
>>> default):
>>>
>>> final class A
>>> {...}
>>
>> Not the same as `final:` inside - the above just means you 
>> can't inherit from A. Funnily enough any new methods in A 
>> would still be virtual even if nothing can inherit from it!
>
> What!? That's... horrible! What's the point of that? Is there 
> *any* situation where that makes sense?

That is certainly a compiler bug if this is the case.


More information about the Digitalmars-d mailing list