> On Mar 4, 2016, at 10:51 AM, Michael Catanzaro <[email protected]> wrote:
>
>> - Style guide should encourage programmers to use final instead of override
>> whenever possible. I suspect many of the functions that currently are tagged
>> override should be final instead. Agreed?
>
> What's your reasoning for this suggestion?
These are internal interfaces within the project. If we later find out we need
to override in a derived class, at that time we can change final to override.
As long as we don’t need to override in a derived class, having something
marked final instead of override lets the compiler do more optimization. And it
tells someone reading the code that there is no further overriding in derived
classes. Also, the word final is shorter.
It’s similar to why we want people to make things as private as possible,
preferring private to protected and protected to public. We can always make
them more private later.
— Darin
_______________________________________________
webkit-dev mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-dev