[fpc-pascal] Advanced Records - Why not available by default?

J.-c. Chu jcchu at acm.org
Sun Jan 15 07:43:25 CET 2012


For one thing, class variables, class methods, and class properties are
subject to visibility controls and inheritance.

So you can, for example, have a private class variable initialized with
class constructor (which avoids code in the INITIALIZATION section) and
accessed via a read-only class property (which is impossible with
unit-level variables).

These “advanced” features are there to provide better encapsulation.
And if you don’t need object-oriented programming, I don’t think they’re
going to harm you or your programs, either.


On January 15, 2012, Daniel Gaspary wrote:
> On Sat, Jan 14, 2012 at 21:59, Lars <noreply at z505.com> wrote:
>> Personally, I'm getting sick of all the new features added to delphi that
>> don't add anything meaningful, and just add complexity to the compiler.
> 
> I agrre with you. I like some features of advanced records.
> 
> But a lot of things seems a big redundancy.
> 
> The possibility of "class var"s specially surprised me ? For What
> purpose that could be good for ?
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
Best Regards,
J.-c. Chu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4438 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120115/13f1a0ee/attachment.bin>


More information about the fpc-pascal mailing list