|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>>>> I'm saying that C++ does not enforce that you don't change private instance
>>>> variables from outside the class.
>>> And this has exactly what to do with whether (compiler-enforced) data
>>> hiding is a good thing or not?
>
>> Because there's two reasons for data hiding: (1) allow more flexibility in
>> implementation, (2) allow easier debugging.
>
>> If you can violate my encapsulation, I don't see the data as especially
>> encapsulated, is all.
>
> You didn't answer my question.
You said the designs of C# and Java are badly broken because they let you
get to the private variables of an instance using reflection. You then said
C++ doesn't let you get to a private variable of an instance. I was
disputing that claim. That's what compiler-enforced data hiding has to do
with C++.
> "Is enforced data hiding a good thing or a bad thing?"
> "In C++ you can bypass the encapsulation, so it's a bad thing."
You skipped a bunch of context in between that I thought still applied.
Maybe you're reading messages in a different order than I am. That's one of
the problems when a conversation really gets going online. :-)
If you're not going to apply that context, see my other messages where I
explain the types of access and seem to be mostly in agreement with you.
>>> Every single discussion about programming with you turns into C++ bashing,
>>> no matter what the subject.
>> I'm happy to bash any other unsafe OO language you might want to name. :-)
> It's getting really tiresome and old.
I didn't start out bashing C++ this time. We got pretty far until you
*seemed to* claim C++ was better at modularity than C# or Java or CLOS. I
merely listed C++ amongst a half-dozen languages I was criticizing for
different individual design choices.
--
Darren New, San Diego CA, USA (PST)
My fortune cookie said, "You will soon be
unable to read this, even at arm's length."
Post a reply to this message
|
 |