In article <11da…@dont-email.me>,
Arne Vajhøj <ar…@vajhoej.dk> wrote:
>On 10/26/2026 9:21 PM, Dan Cross wrote:
>> term% ruby
>> class A
>> def foo
>> bar
>> end
>>
>> private
>> def bar
>> puts "Hello from A's bar"
>> end
>> end
>>
>> class B < A
>> private
>> def bar
>> puts "Hello from B's bar"
>> end
>> end
>>
>> a = A.new
>> a.foo
>> b = B.new
>> b.foo
>> Hello from A's bar
>> Hello from B's bar
>
>> In *this* language, `private` doesn't mean what it means in C++.
>
>In Ruby it means object private instead of class private. And as
>demonstrated in my other post then it is a OO encapsulation
>disaster.
>
>But the second example quoted here is actually not different from C++.
>Because C++ interprets visibility as just that and does not
>include overrideability.
I think you missed the point. If you want to criticize the
author of, "PHP: a Fractal of Bad Design" for "not knowing OO"
because of what they wrote about `private` methods, then you'd
better know what they were referring to. Consider that,
perhaps, that author _may_ know just a little bit more than you
do about OO.
- Dan C.