Jonas Maebe schrieb: > Florian Klaempfl wrote on Sat, 17 Oct 2009: > >> Graeme Geldenhuys schrieb: >>> 2009/10/16 Paul Ishenin <webpi...@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).
True. But sealed requires no recompilations to do the optimization, so it works always. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel