Gavin Sinclair wrote:
> Hal wrote:

>>As for the name, personally I don't see that "self" would
>>conflict anywhere. You wouldn't be calling it from within
>>the object's methods, and if you did, well... you would
>>just get the "self" we have always had.
>>
>>"self" with a receiver, obj.self, does not currently have
>>any meaning I'm aware of.
> 
> 
> So, given this:
> 
>   class Object
>     def self
>       self
>     end
>   end
> 
> Would the marked line below be using the method 'self' or the special
> variable 'self'?
> 
>   class X
>     def foo
>       self.bar       # This one.
>     end
>     def bar
>       5
>     end
>   end
> 
> Furthermore, is the definition of Object#self above recursive? ;)

Excellent points. :)

Those are only issues if you implement it in Ruby. If you put the
logic in the parser/interpreter, that can be resolved, I think.

But why am I saying this? I haven't felt a need for this feature
personally.



Cheers,
Hal