[fpc-devel] class abstract, class sealed implementation. please review.
Jonas Maebe
jonas.maebe at elis.ugent.be
Sat Oct 17 22:28:25 CEST 2009
Florian Klaempfl wrote on Sat, 17 Oct 2009:
> Graeme Geldenhuys schrieb:
>> 2009/10/16 Paul Ishenin <webpirat at mail.ru>:
>>> Sealed class is a class which can't be derived by another class.
>>> This one is
>>> fully supported by delphi.
>>
>> Would you mind explaining this - I never saw the benefit of a sealed
>> class.
>
>> From a compiler developers point of view, it makes optimization easier
> under certain cases (e.g. virtual method calls).
FPC can already do this automatically for all classes in the entire
program with whole-program optimization. You don't need sealed classes
for this (they might slightly improve those optimizations, but I doubt
it will be noticeable in real life -- even doing it for an entire
program using WPO generally has no noticeable effects on speed, and
only marginal effects on code size).
Jonas
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the fpc-devel
mailing list