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 <nore...@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@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
Best Regards,
J.-c. Chu

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to