Re: Multimethod dispatch?

2003-06-03 Thread Adam Turoff
On Sun, Jun 01, 2003 at 10:44:02PM -0600, Luke Palmer wrote: You must not be following Perl 6 closely enough, then. Perl 6 is a real programming language now, as opposed to a scripting language. Um, I've followed Perl6 closely enough to know that the distinction between real langauge and

Re: Multimethod dispatch?

2003-06-03 Thread Luke Palmer
Adam Turoff writes: On Sun, Jun 01, 2003 at 10:44:02PM -0600, Luke Palmer wrote: It will still have a lot of power in text processing, and still be a powerful quicky language, but that's no longer its primary focus -- not to say that highly structured programming is. Some applications

Re: Multimethod dispatch?

2003-06-03 Thread Adam Turoff
On Mon, Jun 02, 2003 at 10:34:14AM -0600, Luke Palmer wrote: And I don't see what's stopping someone from writing Dispatch::Value. use Dispatch::Value; sub foo($param is value('param1')) {...} sub foo($param is value('param2')) {...} What it seems you're wanting is it to be in

Re: Multimethod dispatch?

2003-06-03 Thread Me
A better fitting solution wouldn't focus on classic MMD, but simply Dispatch, where type- and value-based dispatching are two of many kinds of dispatching supported. I've always liked the sound of Linda's tuple spaces and view that as a nice generalized dispatch approach. Procedure calls are

Multimethod dispatch?

2003-06-02 Thread Adam Turoff
Apologies if I've missed some earlier discussions on multimethods. The apocolypses, exegesises and synopses don't seem to say much other than (a) they will exist and (b) wait for apocolypse 12 for more information. Looking over RFC 256[*] and Class::Multimethods[**] it sounds like the intent is

Re: Multimethod dispatch?

2003-06-02 Thread Luke Palmer
Apologies if I've missed some earlier discussions on multimethods. The apocolypses, exegesises and synopses don't seem to say much other than (a) they will exist and (b) wait for apocolypse 12 for more information. Looking over RFC 256[*] and Class::Multimethods[**] it sounds like the

Re: Multimethod dispatch?

2003-06-02 Thread Simon Cozens
[EMAIL PROTECTED] (Luke Palmer) writes: It will still have a lot of power in text processing, and still be a powerful quicky language, but that's no longer its primary focus -- not to say that highly structured programming is. So, uh, what is? And you can still do it the Perl 5 way in Perl

Re: Multimethod Dispatch

2002-09-05 Thread Dan Sugalski
At 9:27 PM -0400 9/4/02, Ken Fox wrote: Dan Sugalski wrote: At 9:10 AM -0400 9/4/02, [EMAIL PROTECTED] wrote: So, just to clarify, does that mean that multi-dispatch is (by definition) a run-time thing, and overloading is (by def) a compile time thing? No. They can be both compile time things or

Re: Multimethod Dispatch

2002-09-04 Thread Ken Fox
David Wheeler wrote: Ah, yes, the same thing exists in Java. I remember, now. I thought Java only has over loading? Over loading is what C++ has. It is not the same as multi-dispatch. The trouble with over loading is that the compiler uses static (compile-time) type information to select the

Re: Multimethod Dispatch

2002-09-04 Thread [EMAIL PROTECTED]
From: Ken Fox [EMAIL PROTECTED] Over loading is what C++ has. It is not the same as multi-dispatch. The trouble with over loading is that the compiler uses static (compile-time) type information to select the over loaded method. This can create subtle bugs when people try to re-use code by

Re: Multimethod Dispatch

2002-09-04 Thread Dan Sugalski
At 9:10 AM -0400 9/4/02, [EMAIL PROTECTED] wrote: From: Ken Fox [EMAIL PROTECTED] Over loading is what C++ has. It is not the same as multi-dispatch. The trouble with over loading is that the compiler uses static (compile-time) type information to select the over loaded method. This can

Re: Multimethod Dispatch

2002-09-04 Thread David Wheeler
On Wednesday, September 4, 2002, at 06:58 AM, Dan Sugalski wrote: No. They can be both compile time things or runtime things, depending on the characteristics of the language. So if it's compile-time for a given language, how is it different from the Java concept of overloading? And will

Re: Multimethod Dispatch

2002-09-04 Thread Dan Sugalski
At 7:31 AM -0700 9/4/02, David Wheeler wrote: On Wednesday, September 4, 2002, at 06:58 AM, Dan Sugalski wrote: No. They can be both compile time things or runtime things, depending on the characteristics of the language. So if it's compile-time for a given language, how is it different from

Re: Multimethod Dispatch

2002-09-04 Thread Florian Haeglsperger
(), but that's the whole point of overloading and multimethod dispatch, isn't it? The usual list context / scalar context distinction would of course still be possible. It's just about _extending_ context sensivity. [Comments | Suggestions | Criticism] welcome.

Re: Multimethod Dispatch

2002-09-04 Thread Mark J. Reed
of the method). I believe this is what has been referred to as multimethod dispatch on this thread. An overridden method is two methods with the same name AND type signature in two different classes, where one class is a subclass of the other. The child class's method is said to override

Re: Multimethod Dispatch

2002-09-04 Thread Damian Conway
Dan Sugalski wrote: Dan, can you explain what multimethod dispatch is? Damian can explain it better than I can, I thought you did a great job! However, anyone who wants to know more about multiple dispatch might also like to read: http://www.samag.com/documents/s=1274/sam05010010

Re: Multimethod Dispatch

2002-09-03 Thread Dan Sugalski
At 5:41 PM -0700 9/3/02, David Wheeler wrote: On Tuesday, September 3, 2002, at 05:08 PM, Dan Sugalski wrote: We call that concept multimethod dispatch. That's what you're asking for. Dan, can you explain what multimethod dispatch is? Damian can explain it better than I can, but it's