Re: Python and Perl interop

2004-10-12 Thread Steve Fink
Perl5 has the notion of contexts, where an expression may behave very differently in string, boolean, or list context. Perl6 intends to expand that notion. What if the whole context notion were moved down into Parrot? Every function call and every MMD dispatch could have an additional context param

Re: Python and Perl interop

2004-10-12 Thread Leopold Toetsch
Sam Ruby <[EMAIL PROTECTED]> wrote: > Leopold Toetsch wrote: > In Python terms, __add__ is but one of several methods that strings > have. Other common ones include index, join, lower, replace, and split. I just used __add__ as an example. Of course all (differing) vtables and methods would need

Re: Python and Perl interop

2004-10-12 Thread Sam Ruby
Leopold Toetsch wrote: Dan Sugalski wrote: At 2:03 PM -0400 10/11/04, Sam Ruby wrote: Separate op won't work for Python. Consider: def f(x,y): return x+y print f(5,6) # 11 print f("a","b") # ab Oh, sure it'd work, if you had an ADD_OR_CONCATENATE op with an appropriate MMD table. :) Yes

Python and Perl interop (was: --pirate and coroutines)

2004-10-12 Thread Leopold Toetsch
Dan Sugalski wrote: At 2:03 PM -0400 10/11/04, Sam Ruby wrote: Separate op won't work for Python. Consider: def f(x,y): return x+y print f(5,6) # 11 print f("a","b") # ab Oh, sure it'd work, if you had an ADD_OR_CONCATENATE op with an appropriate MMD table. :) Yes, *but" we have to do t