Re: [Libxmlplusplus-general] coding style issues
- From: Stefan Seefeld <seefeld sympatico ca>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [Libxmlplusplus-general] coding style issues
- Date: Fri, 31 Jan 2003 11:53:37 -0500
Murray Cumming wrote:
On Fri, 2003-01-31 at 17:13, Stefan Seefeld wrote:
3) hiding state in the private section:
It's a matter of good encapsulation to put all members into the
private section, and then provide accessors (either public or
protected). That helps to decouple dependencies between base and
derived classes. Of course, derived classes then can't access the
member variable. That's exactly the point, that's the goal !
And I say "you can't predict the future" so you should not completely hide complex types.
that is a very dangerous argument, at least when applied in general:
What if my wrapper acts as a proxy, or serializes access (making the API
thread-safe), etc. ? This totally defeats the whole point of
encapsulation.
That said, the question really needs to be addressed case by case.
Regards,
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]