Hi!
Many hardcore OOP programmers (C++ included) only use member variable
names for class internals when they need to be "visible" outside the
class. They also prefer using Get/Set/etc. functions for obtaining
information internal to the class, not public variable names. In my
mind, it's a bit fanatical. I greatly prefer (and use) the method you
suggested.
Rather than routinely making everything "private" (as is the OOP
convention), only violating this and making "public" or "protected"
when absolutely necessary, I generally do the opposite. That is, make
it private/protected only when necessary. I guess "necessary" is the
operative word here. It's rather subjective. OOP programming uses
a "better safe than sorry" philosophy. My question to this is "safe
from what?" and at what expense?
There's an old quote in the UNIX world in reference to OOP
programming and its epitomical language, Lisp. It goes:
Lisp programmers know the value of everything and the cost of nothing.
A rather sharp indictment, but it does have a fundamental point.
Data/function hiding is expensive, processing wise. So the question
is, is this hiding such a holy grail? To many, it is!;)
thx,
Dave S.
--- In anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com, Matthias Buelow <mb
...>
wrote:
>
> ddotedotsdot wrote:
>
> > However, in deference to folks who like such things "hidden", you
can
> > alternatively use one of the wxWindow::FindWindow
> > [ById|ByLabel|ByName] functions (since most all "visible"
wxWidgets
> > elements are derived from wxWindow). Personally, I find it an
> > unnecessary level of indirection and cumbersome to use, but many
> > prefer it as a "general/conventional" C++ paradigm.
>
> In what way would that be a "general/conventional C++ paradigm"?
>
>
> --
> Matthias Bülow Schaeffer AG
> Hohentwielsteig 6a Tel. +49-30-8058695-0
> 14163 Berlin Fax: +49-30-8058695-33
> http://www.schaeffer-ag.de
>
> HRB 93611 B, Amtsgericht Berlin Charlottenburg
> Vorstand: Jörg Schaeffer, Kai Schaeffer
> Aufsichtsrat: Dieter Kersten (Vorsitzender)
>
.