matz / ruby-lang.org (Yukihiro Matsumoto) wrote in

> It's OK for me to open up new RCR.  But to tell the truth, I feel like
> that explicit dipatch based on type is not a Ruby-way(TM).  

....neither is it a Smalltalk-way

> You don't have to give it up though.
> 

Again: I personally won't/wouldn't make use of it neither. Ok, maybe for
demonstration purpose ;-) 

This feature would (of course) have impact in other areas of Ruby. As
Mathieu in [ruby-talk:16930] claims, we would at least need to add "his"
multi-part-method-declaration or change/extend the method related
introspection mechanisms. 

As I said in my initial post I would regard this feature as an
"appetizer" for C++/Java/...-converts, which often believe that they need
typechecking (and methodoverloading). 

So as a first go we could take Guy's (optional) parameter-type-checking
implementation AND still NOT allow method overloading. 

class Foo
  def typeCheckedBar(String aString)
    ...
  end
  def rubyWayBar(aString)
    ...
  end
end

On the other hand the question remains, whether my reasoning (see above)
is sufficient to add such a feature to Ruby? 

Also, talking in terms of AOP, we could regard parameter-type-checking as
an "aspect" and thus add it to AspectR. Avi, Robert? 

Regards
Clemens