[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Is better to subclass or to add methods to an existing class?
From:       "Marcin 'Qrczak' Kowalczyk" <qrczak () knm ! org ! pl>
Date:       2002-09-21 17:01:07
[Download RAW message or body]

Fri, 20 Sep 2002 14:40:35 +0900, Christoph <chr_news@gmx.net> pisze:

> This runs squarely against a prominent argument of the ``anti
> multi-method camp'' that Ruby's ``open classes'' (a very descriptive
> term btw.) somehow reduce the need of method overloading.
> 
> Apparently the exact opposite seems to be true: Method overloading
> (preferable in the incarnation of full blown multi-methods) and
> ''class openness' seem to form a very strong synergy ...

It seems logical to me. If methods are standalone objects, it's
easy to do both multidispatch (looking up classes inside a method,
not methods inside a class - lookup is more complicated but there is
no problem *where* to look up) and creating methods anytime (classes
aren't modified so it makes no sense to freeze them; they are methods
which are modified).

-- 
  __("<      Marcin Kowalczyk
  \__/     qrczak@knm.org.pl
   ^^    http://qrnik.knm.org.pl/~qrczak/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic