[Issue 15390] 'abstract' should override final:

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Dec 1 00:06:06 PST 2015


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

--- Comment #2 from Manu <turkeyman at gmail.com> ---
(In reply to Infiltrator from comment #1)
> I don't know whether I agree with your statement "naturally, this is the
> first line in any D class", but I agree that final: and abstract: should
> override each other as public:, protected:, etc. do.
> 
> I assume that you are currently working around this buy having all of your
> abstracts up the top before your final: line?

Yeah. It's fine for now, it's just a awkward.

In this case, the D class is an extern(C++) mirror of the C class, which means
if I rearrange the virtual functions, the vtables no longer match. Obviously I
have to take care to not rearrange the order of the virtuals, but it's harder
to prove this when I can no longer diff the C++ and D code (which are almost
identical in terms of lines). Since the D class must be rearranged, it's much
harder to compare it to the C++ version, and I don't see a good reason for that
nuisance.

Of course, the common case is that 'final:' appear at the top of every class,
for reasons that I'm trying to stop repeating ;)

--


More information about the Digitalmars-d-bugs mailing list