Skip to content

Commit

Permalink
Adds bytecode and block, refs #728
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed May 9, 2018
1 parent a7f3dcd commit 520e313
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions doc/Language/glossary.pod6
Expand Up @@ -125,12 +125,12 @@ called by name.
Note that it is still allowed to have a name, but you cannot call it by
that name:
=for code
# anonymous, but knows its own name
my $s = anon sub triple($x) { 3 * $x }
say $s.name; # OUTPUT: «triple␤»
=for code :skip-test
say triple(42); # OUTPUT: «Undeclared routine: triple␤»
=for code
# anonymous, but knows its own name
my $s = anon sub triple($x) { 3 * $x }
say $s.name; # OUTPUT: «triple␤»
=for code :skip-test
say triple(42); # OUTPUT: «Undeclared routine: triple␤»
=head1 API
X<|API>
Expand Down Expand Up @@ -213,9 +213,14 @@ signature. The code that does this is called the I<binder>.
=head1 block
X<|block>
L<Blocks|https://docs.perl6.org/type/Block> are code object with its own lexical scope, which allows them to define variables without interfering with other in the containing block.
=head1 bytecode
X<|bytecode>
Although Perl 6 looks like an interpreted language, since it uses the C<#!> form to run its scripts (and they are called I<scripts>), it is actually
L<compiled to run in a virtual machine|https://www.reddit.com/r/perl6/comments/42dkme/perl6_not_being_an_interpreted_language/> so the compiler (currently Rakudo) generates L<bytecode |https://en.wikipedia.org/wiki/Bytecode> that runs either in MoarVM or the Java Virtual Machine, the two VMs currently supported.
=head1 Camelia
X<|Camelia>
Expand Down

0 comments on commit 520e313

Please sign in to comment.