Information générale
Catégorie:
Codage, syntaxe et commandes
> You need to understand that "protected" is description how to handle the
> object. Methods and Properties are owned by the object so they
> inhertit "protected".
In Fox, 'HIDDEN' and 'PROTECTED' are a complete & utter mess. In addition to the senseless behaviour they also exact a runtime penalty, so it is best to avoid them altogether. Standardized comment tags like '*private*' etc. in class definitions serve equally well for documentation purposes, as does suffixing private/protected members with an underscore so that naughty acts like messing with other object's private parts are easy to recognize for both human readers and automated tools.
In any sane system one would expect an object reference to behave according to the referenced object's class definition, regardless of which other objects happen to hold private/protected/whatnot references to the object in question. Also, the Fox model isn't even terribly consistent with itself.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement