Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2008-01-03 Thread Bob Rogers
From: Allison Randal [EMAIL PROTECTED] Date: Thu, 27 Dec 2007 19:15:40 +0200 Bob Rogers wrote: Thought so. I ask because Common Lisp has provision for anonymous classes, and I was wondering how I might support that some day. But my interest is just academic curiosity at

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-29 Thread Allison Randal
Will Coleda wrote: Yes, it would be specified as Int/Str/Num in the signature. But then invoking the multi with an I register or integer constant should recognize 'Int' as being a match, and not just 'Integer'. My concern here is HLL interop. I think it would be cleaner to specify the base

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-29 Thread Allison Randal
Klaas-Jan Stol wrote: Earlier I read over this, thinking: there's probably a good reason for that (the need for being contiguous), but I haven't figured it out yet. For sake of documentation, could you please explain why this is so? so, why would it not be possible to write this: sub foo

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-29 Thread Klaas-Jan Stol
On Dec 29, 2007 11:34 AM, Allison Randal [EMAIL PROTECTED] wrote: Klaas-Jan Stol wrote: Earlier I read over this, thinking: there's probably a good reason for that (the need for being contiguous), but I haven't figured it out yet. For sake of documentation, could you please explain why

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-29 Thread Allison Randal
Klaas-Jan Stol wrote: In order to solve that, adding a :invocant('any') (* a special marker would be more convenient, maybe someone would like to define a class 'any' (you never know :-) but that's beside the pointnow *) By adding these markers, what effectively happens is that all :invocant

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-28 Thread Will Coleda
-- Will Coke Coleda On Dec 27, 2007, at 1:09 PM, Patrick R. Michaud [EMAIL PROTECTED] wrote: On Thu, Dec 27, 2007 at 07:56:35PM +0200, Allison Randal wrote: Patrick R. Michaud wrote: On Thu, Dec 27, 2007 at 07:15:40PM +0200, Allison Randal wrote: With autoboxing/unboxing, there's not

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-28 Thread chromatic
On Friday 28 December 2007 04:15:03 Will Coleda wrote: My concern here is HLL interop. I think it would be cleaner to specify the base types ( or perhaps a does ) to be generic enough to let another language invoke your multis. With regard to autoboxing situations, you think the compiler

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-28 Thread Patrick R. Michaud
On Fri, Dec 28, 2007 at 12:37:56PM -0800, chromatic wrote: On Friday 28 December 2007 04:15:03 Will Coleda wrote: My concern here is HLL interop. I think it would be cleaner to specify the base types ( or perhaps a does ) to be generic enough to let another language invoke your multis.

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Allison Randal
Klaas-Jan Stol wrote: we just removed the .pcc_ prefix... (i know, only from some other directives...) :-P anyway, the .invocant, .arg , .result and other directives are grouped together already by the .begin_call/.end_call directives. IMHO, we don't need a prefix to indicate such a grouping.

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Patrick R. Michaud
On Thu, Dec 27, 2007 at 07:15:40PM +0200, Allison Randal wrote: With autoboxing/unboxing, there's not really a need to differentiate between the PMC Integer/String/Float types and the I/S/N registers. Coming into this discussion from the middle (and having not read pdd15 in great detail),

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Allison Randal
Bob Rogers wrote: Thought so. I ask because Common Lisp has provision for anonymous classes, and I was wondering how I might support that some day. But my interest is just academic curiosity at this point, because I'm (still) nowhere near implementation. CLOS dispatches on anonymous

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Allison Randal
Allison Randal wrote: .param pmc a :invocant(['Foo'; 'Bar']) And this has me wondering, for languages that do strict type-checking, will they want to be able to specify the types of non-invocant parameters? So, maybe that should be: .param pmc a :type(['Foo'; 'Bar']) :invocant To

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Patrick R. Michaud
On Thu, Dec 27, 2007 at 07:26:30PM +0200, Allison Randal wrote: Agreed. (It's worth noting that the problem existed before :invocant was added.) Adding :invocant, and giving it a string parameter, means we could do away with the list of types on the :multi flag (we'd still need the :multi

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Allison Randal
Patrick R. Michaud wrote: On Thu, Dec 27, 2007 at 07:26:30PM +0200, Allison Randal wrote: Agreed. (It's worth noting that the problem existed before :invocant was added.) Adding :invocant, and giving it a string parameter, means we could do away with the list of types on the :multi flag (we'd

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Allison Randal
Patrick R. Michaud wrote: On Thu, Dec 27, 2007 at 07:15:40PM +0200, Allison Randal wrote: With autoboxing/unboxing, there's not really a need to differentiate between the PMC Integer/String/Float types and the I/S/N registers. Coming into this discussion from the middle (and having not read

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Patrick R. Michaud
On Thu, Dec 27, 2007 at 07:56:35PM +0200, Allison Randal wrote: Patrick R. Michaud wrote: On Thu, Dec 27, 2007 at 07:15:40PM +0200, Allison Randal wrote: With autoboxing/unboxing, there's not really a need to differentiate between the PMC Integer/String/Float types and the I/S/N registers.

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Patrick R. Michaud
On Thu, Dec 27, 2007 at 07:45:03PM +0200, Allison Randal wrote: Patrick R. Michaud wrote: On Thu, Dec 27, 2007 at 07:26:30PM +0200, Allison Randal wrote: Agreed. (It's worth noting that the problem existed before :invocant was added.) Adding :invocant, and giving it a string parameter, means

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-27 Thread Klaas-Jan Stol
On Dec 25, 2007 4:37 PM, Allison Randal [EMAIL PROTECTED] wrote: Klaas-Jan Stol wrote: I guess you're right :-) I was thinking of ambiguity, like sub foo :multi(Integer, Integer) .param pmc i :invocant .param pmc j .param pmc k :invocant end sub foo :multi (Integer, Integer)

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-26 Thread Klaas-Jan Stol
On Dec 25, 2007 4:37 PM, Allison Randal [EMAIL PROTECTED] wrote: Klaas-Jan Stol wrote: I guess you're right :-) I was thinking of ambiguity, like sub foo :multi(Integer, Integer) .param pmc i :invocant .param pmc j .param pmc k :invocant end sub foo :multi (Integer, Integer)

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-25 Thread Allison Randal
Klaas-Jan Stol wrote: I guess you're right :-) I was thinking of ambiguity, like sub foo :multi(Integer, Integer) .param pmc i :invocant .param pmc j .param pmc k :invocant end sub foo :multi (Integer, Integer) .param pmc j :invocant .param pmc k :invocant end but I guess parrot will see

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-25 Thread Allison Randal
Bob Rogers wrote: I notice that this doesn't allow for anonymous classes, since provision is made only for named classes. Is anonymous class support in prospect? You can't use an anonymous class as a type for multisub dispatch because they don't have a name to dispatch on. A case could be

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-25 Thread Bob Rogers
From: Allison Randal [EMAIL PROTECTED] Date: Tue, 25 Dec 2007 18:16:48 +0200 Bob Rogers wrote: I notice that this doesn't allow for anonymous classes, since provision is made only for named classes. Is anonymous class support in prospect? You can't use an anonymous class as

[svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-22 Thread Bob Rogers
From: [EMAIL PROTECTED] Date: Thu, 20 Dec 2007 00:53:12 -0800 (PST) Author: allison Date: Thu Dec 20 00:53:11 2007 New Revision: 24108 Added: trunk/docs/pdds/pdd27_multiple_dispatch.pod . . . [pdd] Launch the Multiple Dispatch PDD. I notice that this doesn't allow

[svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-20 Thread allison
Author: allison Date: Thu Dec 20 00:53:11 2007 New Revision: 24108 Added: trunk/docs/pdds/pdd27_multiple_dispatch.pod Changes in other areas also in this revision: Modified: trunk/MANIFEST Log: [pdd] Launch the Multiple Dispatch PDD. Added: trunk/docs/pdds/pdd27_multiple_dispatch.pod

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-20 Thread Jonathan Worthington
Hi, Just given this a quick read over; looks pretty good. The only thing I don't see is a way to get the Sub PMC that is going to be invoked without actually invoking it. Invoke does the lookup and then the call, but what if I want to supply the arguments, and then just work out what will be

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-20 Thread Klaas-Jan Stol
hi, looks good as far as I can tell. W.r.t. the selection part, the don't care type is missing, which is _ IIRC. So, .sub foo :multi(Integer,_,_) .param pmc i :invocant .param pmc j .param pmc k .end (must j and k be flagged as :invocant?) then this foo can be invoked with 2 parameters,

Re: [svn:parrot-pdd] r24108 - in trunk: . docs/pdds

2007-12-20 Thread Klaas-Jan Stol
I guess you're right :-) I was thinking of ambiguity, like .sub foo :multi(Integer, Integer) .param pmc i :invocant .param pmc j .param pmc k :invocant .end .sub foo :multi (Integer, Integer) .param pmc j :invocant .param pmc k :invocant .end but I guess parrot will see that the other foo