Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: A wholly inadequate reply to an Anonymous Monk

by moritz (Cardinal)
on Apr 23, 2010 at 08:49 UTC ( [id://836468]=note: print w/replies, xml ) Need Help??


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

Only this time we could break backwards compatibility to fix some of the hairier bits.

(...)

Had this been done we might have gotten something in 2-4 years that was production ready (ran all of CPAN)

Who else spots the logic error in here?

Perl 6 - links to (nearly) everything that is Perl 6.
  • Comment on Re^3: A wholly inadequate reply to an Anonymous Monk

Replies are listed 'Best First'.
Re^4: A wholly inadequate reply to an Anonymous Monk
by bart (Canon) on Apr 23, 2010 at 09:45 UTC
    Who else spots the logic error in here?
    With an approach like use 5.10.0; and use feature, there's no logic error. You can both have Perl 5 compatibility and cleaner behaviour for new scripts.
      Yes, and you don't break backwards compatiblity. Which is what AnonMonk was talking about.

      If you use a menchanism like use $version or use feature there's no need to call it a major new version of perl. We already have these incremental language modifications in perl 5, which AnonMonk wished that Perl 6 would bring them.

      That said, perl 5.10 still breaks backwards compatibility in several ways (introducing new operators, changed scoping of regex modifiers), even though it was "only" a bump in the minor version number. Even if it were possible in theory to avoid that, it would be a huge maintenance burden to ship two regex engines with different scoping rules, which are then swapped depending on the presence of a pragma.

Re^4: A wholly inadequate reply to an Anonymous Monk
by Anonymous Monk on Apr 23, 2010 at 08:53 UTC
    Will Perl 6 be compatible with existing CPAN modules, I mean CPAN modules for Perl 5?

      I think Worthington++ started some strangely named project this autumn to link Perl 5 into Parrot, as an "equal" language. So evals and function/method calls should be doable, then. (Failed to google it right now.)

      Edit: Thx, Audrey++

      See S01 for the answer.
        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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://836468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found