[fpc-pascal] [OT] sealed?

Dmitry Boyarintsev skalogryz.lists at gmail.com
Tue Oct 8 06:14:13 CEST 2013


A well written class doesn't need to be sealed. As well as doesn't require
an inheritance.

IIRC, "sealed" was added to delphi language at the time of the delphi
.nettism. Correct me, if I'm wrong but Delphi-net is dead (replaced by
Oxygen, which is not delphi or pascal).
However, since the keyword was introduced in the some point of the
language, the support was provided in the next versions of the Delphi
language/compiler.
Since FPC announces Delphi-compatibility on syntax level, the keyword was
introduced in FPC as well.

Usefulness of the "sealed" (as some other .nettish syntax, i.e. class
helpers) is questionable and further discussion is probably better for
fpc-other list. So feel free to use it for good or bad.

thanks,
Dmitry


On Mon, Oct 7, 2013 at 11:22 PM, Dennis Poon <dennis at avidsoft.com.hk> wrote:

> > It is wonderful, thank you very much Sven! :)
>
>>
>> Well, the opinion whether this feature is wonderful or not differs among
>> FPC/Delphi users :P
>>
>> Regards,
>> Sven
>>
>>  May I know the usual use of such feature?  I can only think of library
> vendors want to seal a class to prevent users from modifying it without
> paying for an upgraded/better version of such class.
>
> Dennis
>
>
>  ______________________________**_________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.**org<fpc-pascal at lists.freepascal.org>
>> http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2013.0.3408 / Virus Database: 3222/6731 - Release Date: 10/07/13
>>
>>
>>  ______________________________**_________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.**org<fpc-pascal at lists.freepascal.org>
> http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131008/c475d4eb/attachment.html>


More information about the fpc-pascal mailing list