[webkit-dev] 'final' class specifier and 'final' method specifier
fujii.hironori at gmail.com
Thu Dec 20 17:51:03 PST 2018
On Fri, Dec 21, 2018 at 5:02 AM Konstantin Tokarev <annulen at yandex.ru>
> > On Thu, Dec 20, 2018 at 7:42 AM <Ross.Kirsling at sony.com> wrote:
> >> In that case, I'll point out that C++ Core Guidelines has a rule
> "Virtual functions should specify exactly one of virtual, override, or
> >> (
> >> Their tl;dr:
> >> "
> >> • virtual means exactly and only “this is a new virtual
> >> • override means exactly and only “this is a non-final
> >> • final means exactly and only “this is a final overrider.”
> >> "
> >> FWIW, they also have a rule "Use final sparingly" with the note that
> "Claims of performance improvements from final should be substantiated."
> >> (http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-final)
> > C.128 is a same rule with the current WebKit coding style guidelines.
> > But, I think C.128 makes sense with C.139.
> > C.139 is against to Bug 192844.
> > After Bug 192844 update, we will have a lot of 'final' classes, not
> Do you have an idea how to automate this? Otherwise we'll never reach the
> state where all leaf classes are final, because doing it manually will
> take lots of
> time, and I see no way to enforce the rule in new code
I don't have such intelligent plan. I don't like the divergence
between WebKit Code Style Guidelines and WebKit source code. I've
often got review feedbacks that I should modernize the code
around my change. I'm going to change them manually, and all
patches will be checked by reviewer's eyes. There is a previous
Bug 159802 – Add final keyword to WebCore/svg classes
It seems that I shouldn't change the current 'final' method specifier rule
Then, I think the sentences should be revised such like C.128.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev