<?xml version="1.0" encoding="windows-1252"?>
<node id="836490" title="Re^6: A wholly inadequate reply to an Anonymous Monk" created="2010-04-23 06:40:07" updated="2010-04-23 06:40:07">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
S01 says "we sure wish so".
&lt;p&gt;
As for it actually happening..
&lt;p&gt;
Perl 6 has drastically different calling conventions than Perl 5, and even now has characters in its standard library functions that are prohibited in Perl 5 ("-"). The only way I see them inter-operating is through some hairy foreign function interface.

Let's take this example from S01:

&lt;code&gt;
    use v6;
    # ...some Perl 6 code...
    {
        use v5;
        # ...some Perl 5 code...
        {
            use v6;
            # ...more Perl 6 code...
        }
    }
&lt;/code&gt;

How would this work with some real code dropped in:

&lt;code&gt;

    use v6;
    
    multi sub foo-bar(Str $a, Str $b) { "str/str" }
    multi sub foo-bar(Str $a, Int $b) { "str/int" }
    multi sub foo-bar(Str $a, Num $b) { "str/num" }
    multi sub foo-bar(Str $a, Array $b) { "str/num" }
    {
        use v5;
        # oh shit, what now? do I:
        foo-bar("1", "2"); # syntax error
        call_perl6_func("foo-bar", "1", "2"); # calls, but breaks since Perl5 has no types
        # Maybe this instead:
        call_perl6_func("foo-bar", Perl6cast("Str", "1"), Perl6cast("Str", "2");
        {
            use v6;
            # now how do I call perl 5?
        }
    }
&lt;/code&gt;

That's just the &lt;b&gt;simple&lt;/b&gt; case of calling a subroutine.  How about the totally incompatible object systems?
&lt;p&gt;
Does someone have a plan for getting this working?</field>
<field name="root_node">
836349</field>
<field name="parent_node">
836474</field>
<field name="reputation">
8</field>
</data>
</node>
