From: Yukihiro Matsumoto Date: 2006-10-04T17:36:29+09:00 Subject: Re: Private visibility should be removed from Ruby 2 [was: Caveats with #method_missing] Hi, In message "Re: Private visibility should be removed from Ruby 2 [was: Caveats with #method_missing]" on Tue, 3 Oct 2006 21:20:21 +0900, "Tomasz Wegrzanowski" writes: |> |* remove "protected" visibility completely | |Nobody uses "protected" (0 uses in standard library - can anybody find some |code that actually uses it ?). Nobody understands it. "protected" is like "friend" in C++. Currently a few programs use it, but it does not mean it isn't useful. |How was it supposed to work ? Am I the only one with a problem here ? This is a bug. I should have checked protected visibility based on real "self" within instance_eval. It will be fixed soon. |And getting rid of it make metaprogramming easier. |One example: I have no idea how to make delegation by method_missing |that behaves correctly with public, protected and private methods. |Delegation would either have to ignore visibility (what is wrong - |see preexplanation again) or fail to forward some methods. Removing visibility makes the issue much easier, I admit. But you may agree that visibility has its own merit on the other hand. It's just a trade off. It might mean the demand for the delegation along with the original visibility. I will be back with your other points later. matz.