[Python-Dev] type categories

Samuele Pedroni pedroni@inf.ethz.ch
Fri, 16 Aug 2002 16:22:46 +0200


>FYI,
>
>   http://www.cs.washington.edu/research/projects/cecil/www/pubs/
>
>has lots of good papers from the Cecil project, a pioneering
>multiple-dispatch language.  Or you could save time reading and learn by
>repeating their early mistakes <wink>.

it's prototype based, not class based so not everything is 
relevant, but at least the survey part
in (not the algo descr) is relevant to the discussion at hand:

Efficient Multiple and Predicate Dispatching

http://www.cs.washington.edu/research/projects/cecil/www/pubs/dispatching.html

btw predicate dispatching is a generalizazion of multimethod dispatch
but still is not the same as ML pattern matching form of function
definition:

""Functions can actually perform pattern matching on the argument. The form:
fun f (x:t1):t2 => (case x
    of pat_1 => exp_1
    | ...
    | pat_n => exp_n)
can be written directly as:
    fun f pat_1 = exp_1
    | ...
    | f pat_n = exp_n

"""  [http://www.cs.cornell.edu/riccardo/prog-smlnj/notes-011001.pdf]
for 'case' order is relevant as Andrew Koeinig said.

I don't think it makes sense to generalize this in a non-local
way. For the point of view of predicate dispatch all
the single patterns would be different "predicates"
so potentially ambiguous.

And you people are bringing me mad, you cannot even
agree on the terminology and avoid in that way the tiniest
non-problems, Argh <wink>

everybody-should-do-his-homework'ly y'rs.