Hi --

On Fri, 22 Apr 2005, Yukihiro Matsumoto wrote:

> Hi,
>
> In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"
>    on Fri, 22 Apr 2005 06:25:23 +0900, "David A. Black" <dblack / wobblini.net> writes:
>
> |> Besides seeing no real need, such method is highly connected to the
> |> current implementation.  Future Ruby (or different implementation of
> |> Ruby interpreter) may want to choose other strategy, for example,
> |> creating a temporary class-like object to manipulate singleton
> |> methods, then update internal object structure according to that
> |> class-like object.  Under the implementation like this, a method to
> |> obtain singleton class has no meaning.
> |
> |What would: (class << obj; self; end)  give you if there's no
> |singleton class?
>
> In that case, it would give you a (perhaps one-time only) class-like
> object described above.

So....

   x = class << obj; self; end
   y = class << obj; self; end

x and y would be two class-like objects, instead of one class?  Also,
what exactly is a class-like object?

Maybe there should be singleton modules instead of singleton
classes....  (That would also solve the problem of "singleton class"
having two meanings.)


David

-- 
David A. Black
dblack / wobblini.net