OO question re: private fields

Frank Heckenbach ih8mj at fjf.gnu.de
Mon Oct 25 23:31:45 CEST 2004


Neil Santos wrote:

> > > > private hiddens from outside world, not from descendants of an object.
> 
> > > Isn't that what `protected' is for?
> 
> > However, `private' means unit/modules wide visibility. -- One could
> > discuss how useful it is, but since we follow (mostly) BP's object
> > model, that's just the way it is.
> 
> That's just what I was wondering about; you see, the descendant that
> is trying to `overwrite' a field is declared in a different module.  I
> had thought `private' would allow me to do what I'm trying to do.

I think it would be strange if such an "overloaded" field is allowed
when in different modules, but suddenly becomes invalid when moved.

Frank

-- 
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
NEW! GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE  D101 CD02 4C9D 0FE0 E5E8




More information about the Gpc mailing list