Thread overview
[Issue 15390] 'abstract' should override final:
Dec 01, 2015
Infiltrator
Dec 01, 2015
Manu
Dec 02, 2015
Infiltrator
Dec 17, 2022
Iain Buclaw
December 01, 2015
https://issues.dlang.org/show_bug.cgi?id=15390

Infiltrator <lt.infiltrator@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lt.infiltrator@gmail.com

--- Comment #1 from Infiltrator <lt.infiltrator@gmail.com> ---
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?

--
December 01, 2015
https://issues.dlang.org/show_bug.cgi?id=15390

--- Comment #2 from Manu <turkeyman@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 ;)

--
December 02, 2015
https://issues.dlang.org/show_bug.cgi?id=15390

--- Comment #3 from Infiltrator <lt.infiltrator@gmail.com> ---
(In reply to Manu from comment #2)
> 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.

The workaround is to just not use ":".  Just abstract or final each function as you go.  It's not pretty; and gets annoying; but if you care about diffing, then it's your best bet for now, I think.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=15390

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--