Hi --

On Sat, 2 Apr 2005, Kazuo Saito wrote:

> During the discussion, Matz brought another new idea to change
> method search rule (See [2]).  The idea protects unwanted method
> overriding and conflict of method signatures, by starting method
> search from the class we are looking at, not from "self" object.
> You can call the method in "self" object by adding "self." to
> function style call.
>
> Matz said that these are *experimental* yet and feel free to
> show your idea.

To paraphrase the example on the website:

   class C
     def process
       util        # will always call C#util, even if overridden
       self.util   # will call subclass's #util, if present
     end

     def util
     end
   end

I don't like this because it requires that when you're writing a
class, the class has to know what its subclasses (and subclass
authors) might do.  In general, I don't think accidental re-use of a
method name should be recognized as something the language needs to
intervene in.  The subclass author should look at and work with the
interface of the original class.

> SASADA Koichi suggest us consider a new specification of block local
> variables, appeared on Matz blog.  Babie posted a good English summary
> of the spec to Redhand (See [3]).  Shugo Maeda asked about warning for
> statements that uses block local variables from outside of the block:
>
>   def hoge
>      iter{|a ; b|
>         ...
>      }
>      p a #=> error on CVS HEAD, but this will be warned
>   end
>
> He said that it may be OK to keep this causes error.  Matz answered
> this will be changed to warning, but users will fixed the warning
> in most cases.

Given that this is all being redesigned and changed, I would strongly
prefer a design where everything legal was completely legal and
everything illegal was completely illegal.  Having warning scenarios
be part of a new design makes me feel like the design isn't completely
self-consistent.  However, I do not claim to have a better design
(except the current one, which I prefer, but I know I've lost that
argument :-)

Thanks for the summary!


David

-- 
David A. Black
dblack / wobblini.net