On 12/8/06, TOndrej <[EMAIL PROTECTED]> wrote:
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

I understand your example and that makes sense, but would be handy in
certain cases to change it.

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. ;-)

C++, C#, VB.Net are three I know of.  I think Java also allows it.


--
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to