Object orientation - can you have too much of a good thing?

Jason Johnson jason.johnson.081 at gmail.com
Sun Oct 28 20:22:05 UTC 2007


Ah, I've seen this.  Interesting solution.  Some kind of DSL
translation is the only way I can think of to handle this in
Smalltalk.  Thanks for the link.

On 10/28/07, Lukas Renggli <renggli at gmail.com> wrote:
> > Well, it is a long winded way of saying "yes, multimethod dispatch is
> > nice".  But as he points out, the same thing can be done with
> > double-dispatch (visitor pattern etc.), which is what multimethod has
> > to do anyway, at runtime.  But having multimethod is less typing and
> > more concise, which is worth something.  I personally can't think of
> > any concise way to add it to Smalltalk.
>
> I did something like that a long time ago. I called it 'Functional
> Pattern Matching' as I just attended a course about Haskell at that
> time. In fact it is an implementation of multi-methods:
>
>      http://renggli.freezope.org/programming/smalltalk/fpm
>
> The documentation is a bit misleading. All the matching presented can
> also be done on the arguments. The code itself probably doesn't work
> with recent images anymore. Try with Squeak 3.6 or 3.7.
>
> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>



More information about the Squeak-dev mailing list