--- Begin Message ---
On Thu, 24 Oct 2002, Berend de Boer wrote:
> K. Ari Krupnikov wrote:
> >I disagree. Making something private marks it as unimportant to the
> >user (who, as the saying goes, might be you in three months).
> No, making something private is mainly a hack by languages that don't
> have class invariants. Visibility of features to clients comes secondary
oi, that's so wrong it hurts my eyes! for starters, there's no shortage of
class invariant implementations for popular oo-languages sa. Java and C++.
i don't see quite what access control has to do with class invariants in
the first place - sure you're not thinking about c++ const?
access control is a way to define multiple interfaces in a single class,
as a very convenient way to hide implementational detail that doesn't
belong in the public interface. again, it is all about interface - and
don't forget that methods have access specifiers as well (Java/C++).
i would argue myself that class attributes/properties/variables don't
belong in the public interface of a class in the first place, and that
protected access comes from an old dream about code reuse through class
specialisation which was never to come true, but that's just my own
personal views and not something i would declare as FACT.
in all this talk about whether data should be 'active' or 'passive' it
seems most of you guys are forgetting that there's more than _one_ type of
data in a computer system. perhaps some of you mostly work with data
interchange formats (a form of interface) and less with process
implementation - just don't forget that data in various representations is
needed as much for the latter as the former. and that's where 'active'
data comes in, and where oo as a programming paradigm has proven to be
extremely powerful in creating complex, robust systems.
oh and by the way - xml is equally useful as a tool in (object-oriented)
ps my mails don't get through to the list, pls forward
http://www.o-xml.org The Object-Oriented XML Programming Language
--- End Message ---