On Tue, 30 Jan 2024, Hairy Pixels via fpc-devel wrote:
On Jan 30, 2024, at 3:56 AM, Michael Van Canneyt via fpc-devel <fpc-devel@lists.freepascal.org> wrote: Unfortunately I still don't understand after your explanation what adding 'final' is supposed to accomplish. It may well be legitimate, but I have currently no opinion as I don't understand it.Final means there is no possible implementation in another subclass so the compiler doesn't need to invoke the method via the vtable. Ideally this works on the class level too because it's a useful optimization.
Yes, that is one of the effects. I understood that part. It's probably more correct to say that you don't want there to be an override in a descendent class. Offhand I can't think of a use-case, but why not... Michael.
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel