Re: Argument Patterns

2005-03-09 Thread Thomas Sandlaß
HaloO Luke, you wrote: [..] The *method* is the one that knows everything, not the object. So definitions on subtypes of general types only check for those subtypes when dispatching to the methods defined in them. I stand corrected. Lax usage of Any is fair. Defining subtypes of general types and

Re: Argument Patterns

2005-03-09 Thread Luke Palmer
Thomas Sandlaà writes: > Luke Palmer wrote: > >But we always have enough knowledge to optimize the hell out of this, > >and they're not not handwavy "we can probably" optimizations. They're > >real, and they're pretty darn easy. > > I fully agree. But I like to add that a single 'where' on genera

Re: Argument Patterns

2005-03-09 Thread Thomas Sandlaß
Luke Palmer wrote: But we always have enough knowledge to optimize the hell out of this, and they're not not handwavy "we can probably" optimizations. They're real, and they're pretty darn easy. I fully agree. But I like to add that a single 'where' on general types like Int, Str or even Any can s

Re: Argument Patterns

2005-03-09 Thread Luke Palmer
Leopold Toetsch writes: > Luke Palmer <[EMAIL PROTECTED]> wrote: > > > I think we should replace our multimethod system with a more general > > pattern matcher, a "variadic multimethod" system of sorts. Multimethods > > need to be variadic anyway, because we want pugs's quicksort example to > > w

Re: Argument Patterns

2005-03-09 Thread Leopold Toetsch
Luke Palmer <[EMAIL PROTECTED]> wrote: > I think we should replace our multimethod system with a more general > pattern matcher, a "variadic multimethod" system of sorts. Multimethods > need to be variadic anyway, because we want pugs's quicksort example to > work. I'd not say replace. The dispa

Re: Argument Patterns

2005-03-08 Thread Rod Adams
Autrijus Tang wrote: On Tue, Mar 08, 2005 at 04:55:28PM -0600, Rod Adams wrote: I thought Larry already declared that we are not making Perl act like ML (yet). And that was re: type inferencing, not re: pattern matching. :) Thanks, /Autrijus/ Sorry about that. Comcast has decided I only

Re: Argument Patterns

2005-03-08 Thread Autrijus Tang
On Tue, Mar 08, 2005 at 04:55:28PM -0600, Rod Adams wrote: > I thought Larry already declared that we are not making Perl act like ML > (yet). And that was re: type inferencing, not re: pattern matching. :) Thanks, /Autrijus/ pgp3tE8H37UB0.pgp Description: PGP signature

Re: Argument Patterns

2005-03-08 Thread Rod Adams
Luke Palmer wrote: All this Haskell programming has opened my eyes to what our multimethod dispatch could be. As we have seen with C, the dispatch system is a pattern matcher. But it's a pretty terrible one. I think we should replace our multimethod system with a more general pattern matcher, a