--927295978-61296759-1113063951142
Content-Type: MULTIPART/MIXED; BOUNDARY="927295978-61296759-1113063951=:8142"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--927295978-61296759-1113063951142
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

Hi --

On Sun, 10 Apr 2005, Lionel Thiry wrote:

> David A. Black a ñÄrit :
>> I agree that the non-special case should be what it is now, and the
>> case where you don't want overriding should be the one that requires
>> something extra.  But I don't think it should be based on overloading
>> "self" (and I believe having "self" refer to the class context, rather
>> than the object, is a kind of overloading).  If this mechanism is
>> really necessary, I would rather see:
>> 
>>   class C
>>     def process
>>       # ...
>>       C#util
>>     end
>>   end
>> 
>> which is, I think, a more direct way of saying: protect this call from
>> overriding in subclasses.  (Yes, everybody, I do know that this is
>> comment syntax and would require a parser change :-)
>> 
>> 
>> David
>> 
>
> class C
>  def process
>   # ...
>   C::util

That's different; that's a class method.

>  end
> end
>
> equivalent to
>
> class C
>  def process
>   # ...
>   self.C::util
>  end
> end
>
> equivalent to
>
> class C
>  def process
>   # ...
>   self.(C::util)
>  end
> end

These last two don't really fit the dot semantics, and if they're
alternatives to C::util, then they're dealing with a class method
anyway (rather than the issue of limiting the effect of overriding
instance methods).

My suggestion of C#util is based on the common use of # to mean
"instance method of the named class or module".  It wouldn't require
redefinition of the dot notation, nor overloading 'self' to be a
boolean flag (as in the original proposal, where 'self' means both
"the default object" and "don't redirect this to an overridden version
of the method).


David

-- 
David A. Black
dblack / wobblini.net
--927295978-61296759-1113063951142--
--927295978-61296759-1113063951142--