Hi --

On Wed, 15 Mar 2006, Gary Wright wrote:

>
> On Mar 14, 2006, at 10:44 AM, dblack / wobblini.net wrote:
>> I know it sounds minor but I think with the space it's much clearer
>> that this isn't the case:
>>
>>   class << obj
>
> This has problems also.  Too me it now looks like << is a binary
> operator with class and obj as its operands. Or it might be that
> class is the receiver of the '<<' message and obj is the single
> argument. Trans mentioned that it is more like the '<<' is part
> of the keyword as in:
>
> 	class<<  obj

I guess I think of, say:

    C

and

    << obj

as two class-invoking expressions (one by name, one anonymous), with
the class keyword able to handle either type of expression.

> Which suggests yet another variation of:
>
> 	sclass obj
> 	end
>
> or
> 	singleton obj
> 	end

Of course all of this may change if the use of classes to implement
per-object behavior changes.  I think that's why Matz hasn't wanted to
have a singleton_class method (i.e., it couples the concept to much to
the implementation).


David

-- 
David A. Black (dblack / wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! http://www.manning.com/books/black