#Perl6 compiler betas are ready

Ok … I am … well … blown away.

I had thought Perl6 would be the Duke Nukem forever of programming languages. Indeed, it has been in active development for more than a decade. But you can download compilers (yes, you heard me right, compilers) for it now.

You might say “why perl” or “why perl6” or “why now, because we have #insert(language_x) and its wonderful”. Good question, I wasn’t sure why it was relevant, until I started reading some of the code.

Like this RPN calculator. Written as an executable grammar.

Or an instantiation of Greenspun’s tenth rule: a lisp interpreter. I have to ask, if the people who did this did not get the irony of doing what Greenspun indicated would be a side effect of a complex C or Fortran code … though it looks like it was specified largely correctly …

It has lots of nice features, compiles down to different VMs (MoarVM, JVM, and there are compilers to Javascript and others as backend languages). OO for people whom care, threading, promises, etc.

And it uses Perl syntax (extended/modified, regularized, and now parseable).

Likely performance isn’t there quite yet, I’ve not had the chance to play with it, as I am deep into other work right now.

The Perl6 grammar bits and their focus on enabling DSLs actually make one of our projects considerably easier, and solves a very long standing problem I was looking at addressing via other means. I could have used the Marpa parser series for this, but it is a bit more complex than I had hoped, and the expression of grammars in Perl6 looks much more natural.

Viewed 26873 times by 2099 viewers

Facebooktwittergoogle_plusredditpinterestlinkedinmail