http://www.perlmonks.org?node_id=836490


in reply to Re^5: A wholly inadequate reply to an Anonymous Monk
in thread A wholly inadequate reply to an Anonymous Monk

S01 says "we sure wish so".

As for it actually happening..

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:

use v6; # ...some Perl 6 code... { use v5; # ...some Perl 5 code... { use v6; # ...more Perl 6 code... } }
How would this work with some real code dropped in:
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 sinc +e Perl5 has no types # Maybe this instead: call_perl6_func("foo-bar", Perl6cast("Str", "1"), Perl6cast("S +tr", "2"); { use v6; # now how do I call perl 5? } }
That's just the simple case of calling a subroutine. How about the totally incompatible object systems?

Does someone have a plan for getting this working?