Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Modernizing the Postmodern Language?

by salva (Abbot)
on Jul 02, 2020 at 10:07 UTC ( #11118802=note: print w/replies, xml ) Need Help??


in reply to Re^2: Modernizing the Postmodern Language?
in thread Modernizing the Postmodern Language?

without breaking anything, is that possible?

No.

It is impossible to change the internals in any important way and keep XS code working.

Several years ago, Nicholas Clark (a perl's internals guru) tried porting perl 5 to parrot (the Perl 6 runtime), and IIRC, he didn't get too far because of XS. See Ponie has been put out to pasture.

  • Comment on Re^3: Modernizing the Postmodern Language?

Replies are listed 'Best First'.
Re^4: Modernizing the Postmodern Language?
by salva (Abbot) on Jul 02, 2020 at 10:20 UTC
    Also, once you remove the XS compatibility requirement, it would be very naive to reinvent a new guts just for running Perl 7.

    When perl 5 came out, they were forced to invent everything from scratch, but now, there are lots of mature, efficient and feature rich runtimes you can reuse: .Net, JVM, MoarVM, etc.

      When perl 5 come out, they were forced to invent everything from scratch, but now, there are lots of mature, efficient and feature rich runtimes you can reuse: .Net, JVM, MoarVM, etc.

      The problem is when the semantics of the VM don't match the semantics of the language, especially with regard to memory management, dispatch, process models, etc.

        Yes, absolutely. It would be impossible to implement perl 5 on top of any of those VMs and get the same semantics.

        But we are fantasizing about the scenario where breaking backward compatibility is acceptable to the point of removing support for XS.

        So, does it make sense nowadays to keep using reference counting instead of a proper garbage collector? Deterministic destructor calls is a nice thing, but well, it seems most language designers are glad to sacrifice them in favor of proper automatic memory management.

        Does it make sense to use the UNIX process model? isn't it better to move to a higher OS-agnostic abstraction? Actually, proper Windows support was one of the first things proposed on p5p related to improvements people would like to see in future Perls.

        Custom dispatch semantics seems to be something you can emulate in most platforms at the cost of degraded performance.

        So, it is not just that those platforms may have different semantics, it is that those platforms probably have the right semantics.

      but now, there are lots of mature, efficient and feature rich runtimes you can reuse: .Net, JVM, MoarVM, etc.

      Isn't the problem always reference counting vs. tracing gc, though? If you expect DESTROY to run when your objects go out of scope, for example, most gc runtimes won't destruct objects in a timely fashion and I think some won't call destructors at all. I want to say dotNET core got rid of finalizers, for example.

      But regardless of details, I agree that runtime-independence is the kind of aspirational thing that would make the pain of retiring XS worth it.

        Isn't the problem always reference counting vs. tracing gc, though?

        Yes, you have to choose between deterministic destruction or garbage collection.

        Languages with garbage collection usually provide a with construction (that I think comes from LISP).

        Nowadays it seems that everybody (or at least, most language designers) admits that having a proper garbage collector is something so good that it well worths the trouble of requiring those with guards.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2020-08-10 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (58 votes). Check out past polls.

    Notices?