Functional multi-method programming language

Given the recent discussion on topics like Nemerle and C# 3.0, Apple: procedural -> OO -> AOP -> advanced procedural, and other AOP type design concerns, it seems to me that a structurally typed, functional, multi-method (maybe plus predicate dispatch) programming language would allow for FP, OOP, and AOP development without requiring language-external solutions or hacks. Nice and CLOS support multi-method, but not really any other languages. Is there a reason that there is no discussion of multi-method programming? Is it simply too complex to reason about? Is it too slow? Or is there something else that I have missed? Thanks.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

In my opinion there is a hidd

In my opinion there is a hidden issue in programming language discussion that never comes to the surface. It is the issue of non-determinacy. Functional programming is analytic and determinate. This is what makes it so appealing. When we mix imperative code with variables the result can still be analytic, but in general the use of variables and the possibility of failures is a real world non-determinate method. It is not analytic because we can’t predict what the world will do. But we can represent the overall behavior or activity of the program by representing failures along with success. This amounts to a synthetic logic; we know what the program will do but we can’t predict the future

In my opinion there is a hidd

In my opinion there is a hidden issue in programming language discussion that never comes to the surface. It is the issue of non-determinacy.

The subject of non-determinism of various sorts is discussed at length in the logic programming community and in the context of concurrency.

A good place to start is these papers.

My point is that in the 21’

My point is that in the 21’st century non-determinacy should be up front, on the table, and at the top of the agenda. I really don’t see that. I certainly don't mean to imply that on one thinks about it. Many people do. But I have the feeling that this type of thinking isn't popular.

It's like the weather...

"Everybody talks about the weather, but nobody does anything about it."

Other languages with support

Nice and CLOS support multi-method, but not really any other languages.

What about Cecil and Dylan? Cecil has predicate dispatch, too.

Okay...

So given that few languages support multi-method, is it (like, say, structural typing) something that will be "reinvented" under another name to fix the design and programming issues we face today? Or is it an idea that doesn't work in practice?

Efficiency

From my experience the normal argument against multi-methods is efficiency. There be some clever implementatin out there that I haven't heard of though.

Efficiency

How about Prolog?

Although not the conventional definition of "multi-method", couldn't you argue that Prolog actually supports multi-methods given that it matches against all of the parameters?

Not really.

Prolog doesn't have "functions" -- Prolog predicates are term rewrite rules, and you can't really do term rewriting without matching all of the arguments. :)

Well nobody realy mentioned "

Well nobody realy mentioned "functions" so it doesn't realy matter if prolog has them or not. And also Prolog predicates is basicaly the same as Oz procedures which realy are the same as Oz functions.

What about Oz and/or Mercury

What about Oz and/or Mercury in this context? Does anyone have experience with these languages or comments?