Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: A great talk on Perl6

by grondilu (Friar)
on Apr 03, 2014 at 08:39 UTC ( #1080910=note: print w/replies, xml ) Need Help??

in reply to A great talk on Perl6

I hope I'm not wrong but I think a link has not yet been given in this thread.

So, here it is.

Personally, the part I liked the most was when he suggested that eventually pretty much any language will be able to run under Perl 6. I've always kind of hoped something like this, but I would not have dared to state it loud like that.

In Perl 6 what we see is that we expect that there will be all kinds of domain specific languages implanted right within Perl 6. You will be able to write Perl 6 and then you are suddenly flipping to a domain specific language. And the way you’ll do that is simply by saying: “Take the parser and compiler for Perl 6, take the grammar, add in some extra rules that implement the domain specific language, pass that to the compiler”, and the internal parse tree that it emits will just have the transformation of the domain specific parts into standard Perl which will be done in the grammar itself in actions. And then the standard syntax tree goes on to the interpreter or to the compiler or whatever it is. So we see that Perl 6 is not just going to be a standard language but a language where you and the word we uses is 'braid', and we braid into that language the possibility of “In this block I’m going to write in SQL, or in this block I’m going to write in Java, or in this block I’m going to write in Ruby.
Why? - Because there is some tool that I want to use that is much better done in those languages, so what we want to have is a way that you can just say: “At this point in the code use Ruby”, and what will happen is that “use Ruby” command will tell the original compiler you need to use an extended grammar in this scope. And because the grammars are just objects and because objects are composable in Perl 6 it would literally at runtime compose in the Ruby grammar, parse the Ruby, emit the underline opcodes or whatever they happen to be, bytecodes, and just work. So we expect that one of the real powers of Perl 6 will be it will be a great language, not just for gluing different data together, but for gluing different languages together. We see that as a very powerful thing, but to do that we needed very powerful parsing facilities built right into the language.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2018-08-16 04:39 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (166 votes). Check out past polls.