[fpc-devel] class abstract, class sealed implementation. please review.

fpclist at silvermono.co.za fpclist at silvermono.co.za
Mon Oct 19 09:09:21 CEST 2009


Hi guys,

The one situation that I have encountered where a sealed class would be useful 
is where a class exists that need to be private to a class library or another 
class, and must be shared between multiple units and where any attempt to 
override some of its functionality will cause problems or the class, on its 
own, is of no use whatsoever. (Having said that, one never knows what someone 
else can do with ones code.)

I have also encountered situations where I could have benefitted from 
extending the functionality of a class, only to find that it was sealed.

IMO, the sealed modifier was primarily designed to mark a class as sealed for 
commercial reasons, in order to prevent a third party from extending the 
class.

All features being equal, I would rather have class constants and class types 
included in FPC.

Regards,
Nino






More information about the fpc-devel mailing list