This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: setf.scm






>I don't really understand the mechanisms for multi-methods, but can't
>you use double-dispatch (or triple-dispatch, etc) to much the same
>effect?  It's not quite as pretty, as compact, or as formalized, but
>it does nearly the same thing.  And you avoid complicating the
>language.

What do you mean by double-dispatch? Do you mean making two function calls,
each one doing one of the dispatches?

>Of course, the language should be designed for the person writing the
>programs, not the person writing the language... but large languages
>are hard for the programmer to work with too.

I don't see multi-methods as making the language larger, but rather just
generalising existing concepts. One of Scheme's claims to fame is
generalising concepts which exist in other languages, but compacting
these powerful ideas into simple but powerful constructs. So first
class procedure objects perhaps make the language larger. But they
generalise the concept that everything is an object. And consistent
evaluation of the operator and operands (unlike lisp) generalised an
existing concept. Likewise I see consistent evaluation of all the
operands (arguments) in a generic function (by dispatching on all of
them) seems a logical conclusion.