Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add docs for 'use nqp;'
Closes #796
  • Loading branch information
coke committed Dec 19, 2016
1 parent 13c9820 commit 25a076e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion doc/Language/pragmas.pod6
Expand Up @@ -50,7 +50,24 @@ not yet rendered properly.
=item X<B<newline>|newline> [TBD]
=item X<B<nqp>|nqp> [TBD]
=item X<B<nqp>|nqp>
Use at your own risk.
This is a Rakudo-specific pragma. With it, Rakudo provides access to the
L<nqp opcodes|https://github.com/perl6/nqp/blob/master/docs/ops.markdown>
in a top level namespace, for example:
use nqp;
nqp::say("hello world");
Uses the underlying nqp C<say> opcode instead of the Perl 6 routine. This
pragma may make your code rely on a particular version of nqp, and since
that code is not part of the Perl 6 specification, it's not guaranteed to
be stable. You may find a large number of usages in the Rakudo core,
which are used to make the core functionality as fast as possible.
Future optimizations in the code generation of Rakudo may obsolete these
usages.
=item X<B<parameters>|parameters> [NYI]
Expand Down
1 change: 1 addition & 0 deletions xt/words.pws
Expand Up @@ -660,6 +660,7 @@ oo
oop
opaquepointer
opcode
opcodes
opendir
openforwriting
opstring
Expand Down

0 comments on commit 25a076e

Please sign in to comment.