3 ms·
> `final` does one specific thing: It tells a compiler that it can be sure that the given object is not going to have anything derive from it. ...and the compi
by paulddraper 3y ago
> `final` does one specific thing: It tells a compiler that it can be sure that the given object is not going to have anything derive from it.
...and the compiler can optimize using that information.
(It could also do the same without the keyword, with LTO.)
- bluGill 3y agoLTO can only apply in specific situations though, if there is any possibility that a plugin derived from the class LTO can do nothing.