[fpc-devel] class abstract, class sealed implementation. please review.
Florian Klaempfl
florian at freepascal.org
Sun Oct 18 23:04:37 CEST 2009
Jonas Maebe schrieb:
> Declaring a class as "sealed" for optimization purposes is a
> micro-optimization that pollutes the source code. In that case, you'll
> probably have to revert that change again later if you or someone else
> does have to inherit from the class after all. It may also force people
> into using delegation rather than inheritance, and this in turn can
> cause problems if the sealed class is "unsealed" later on and new
> descendants are created after all (e.g., because they directly created a
> delegate of the "sealed" type since it couldn't be inherited from anyway).
>
> Manually doing things that can be automated is almost never a good idea.
No. But I see it as a possibly usefull side effect of OOP access
controll so being even more usefull than e.g. private and friends.
More information about the fpc-devel
mailing list