Yukihiro Matsumoto wrote:
> Hi,
>
> In message "Re: About 1.9 #__method__ feature."
>     on Tue, 4 Jul 2006 01:10:40 +0900, transfire / gmail.com writes:
>
> |What is you take on this?
>
> I am sorry but I am not sure what you're asking here.

No problem. I will try to paint better picture. I have variant of
OpenStruct called OpenObject:

  class OpenObject < BasicObject #(this is my BasicObject like
BlankSlate)
    ...

Using BasicObject as parent removes (almost) all kernel methods which
ensures no name clashes when using the OpenObject. Problem is sometimes
those removed methods are needed. So the important ones are available
by shadow methods, like __send__ even though #send is removed. Problem
is A) how many and which kernel methods should be shadowed; all of
them? and worse B) it means users have to be aware when a subclass of
BasicObject might be used and call the LCD, ie. shadow methods instead
of regular methods.

I came up with one idea that fixes A. using  #__self__, eg.

  o = OpenObject.new
  o.class #=> nil
  o.__self__.class  #=> OpenObject

But it does not solve worse problem of B. Separate public vs. private
methods would solve that though since kernel methods are generally
private.

> I have considered separating public and private method name spaces
> several times, but always failed to make it well designed.

What were the sticking points? I spent some time considering this and
arrived at a conception of layers, almost like subclassing, eg
MyClass:Public < MyClass:Private.
 
T.