On 12/8/06, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:
I still don't know why we can't decrease visibility in Free Pascal.
Is there some internal language design that prevents it?

A class definition (or at least its parts visible from outside) can be
understood as a kind of contract. If you have a class TDog with a
public property Tail then, by definition, any TDog descendant
(TBulldog, TLabrador, TDingo etc.) must have the public property Tail.
Otherwise they wouldn't be TDog but something else, again by
definition.

I'm not even sure if there is a language which allows demoting
visibility of inherited class members. It would seem odd to me. Just
my 2c, of course. ;-)

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

Reply via email to