[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multimethods & angst

For what it's worth, I don't like multimethods - I read the Smalltalk
books as a (late) teenager and never looked back :-) 

However, it looks as if multimethods will be the Way To Go.  From the
object-oriented side, CLOS (and C++??) do this. Ada has allowed
_statically_ overloaded function definitions for years.  The new
functional language Haskell (statically typed), allows overloaded
definitions, but these can be resolved dynamically where necessary,
using technology much like that in the Self compiler. This is coupled
with a "type class" scheme (which I don't really understand) that
provides inheritance. Haskell uses type inference - there are data type
definitions, but variables do not have to be declared as any
particular type (the compiler will computer the type of the variable).

I can't see any reason why this technology wouldn't be applicable to
more mainstream languages within the next few years, extending
statically overloaded languages to dynamic overloading where
necessary. This may be a good thing, allowing the merging of type
systems for "classical" languages, functional languages, and in the
process mostly doing away with "object orientation".

One of the things that appeals to me about Self is the basic object
nature of the language; it seems that for many applications,
(especially involving visual or graphical programming) a concrete
metaphor like this is a great advantage. Indeed, in my opinion the
_philosophy_ of object oriented programming espoused by the Smalltalk
books is better able to be expressed in Self than in Smalltalk, and
this will be lost in a multi-method based language.