On 14/11/2009, at 15:21, James Edward Gray II <james / graysoftinc.com>  
wrote:
>> Even Apps Hungarian is not a great idea in OO code.  Instead, just  
>> use
>> the type system, so that distance would be a Kilometer object and
>> correction would be a Foot object.  Kilometer.+(foot) could then  
>> either
>> raise an exception or invoke a conversion.
>
> I would like to see us move away from considering classes to be  
> types at all in Ruby.  Who knows what modules an object has mixed  
> into it and who knows what singleton methods are defined on it.  A  
> class, which is what people traditionally take for the type, is just  
> one piece of an object's identity.

I would still look immediately to the class of the object in order to  
find out what it's supposed to do. From there, the class definition  
will probably list it's module inclusions prominently.

As a vim user, with very limited interactive debugging, my primary  
exploration technique will usually consist of at most a couple of  
'obj.methods.grep' calls followed by grepping ~/gems which seems to  
emphasize the actual reading of the source for object identity info.

Python's integrated documentation would be really welcome in this  
case, i think. :)

I'm curious what you think the most correct way is to discover object  
identity.

>