## $Id: /mirror/trunk/compilers/nqp/README.pod 27205 2008-04-26T19:29:28.538044Z pmichaud  $

=head1 NQP - Not Quite Perl (6)

This is "Not Quite Perl" -- a compiler for quickly generating PIR
routines from Perl6-like code.  The key feature of NQP is that it's
designed to be a very small compiler (as compared with, say, perl6
or Rakudo) and is focused on being a high-level way to create 
transformers for Parrot (especially hll compilers).  In addition, 
unlike Rakudo, NQP attempts to restrict itself to generating code 
that can run in Parrot without the existence of any NQP-specific 
runtime libraries.

One way that NQP aims to be a lighter version of Perl 6 is by
avoiding syntactic sugar and "dwimminess" that isn't needed
for the types of routines that are written.  Sometimes this
makes coding a bit more work, but it also lowers the learning
curve somewhat.


=head2 Things that NQP has (or should have)

This list isn't exhaustive; for now it's intended to identify the
language constructs that we explicitly know will be supported

=over 4

=item * scalars

=item * binding

=item * lexical 'my', package 'our'

=item * method calls (including named, optional, and slurpy arguments)

=item * subroutine calls (including named, optional, and slurpy arguments)

=item * method definitions

=item * subroutine definitions

=item * '...'                 # string constants

=item * "..."                 # string value with escapes (non-interpolating)

=item * postcircumfix:<[ ]>   # array subscript

=item * postcircumfix:<{ }>   # hash subscript

=item * postcircumfix:«< >»   # constant hash subscript

=item * $<...>                # constant hash subscript of $/

=item * $(...)                # scalar context

=item * prefix:~              # string context

=item * prefix:+              # numeric context

=item * say(), print()        # output

=item * if/unless             # conditional

=item * for                   # iterative loop

=item * PIR q<>, PIR q:to:<END> # inline PIR

=back

=head2 Things that aren't in NQP

There are a large number of Perl 6 constructs and idioms that
aren't supported or expected to be supported in NQP.  This
is by design -- the point of NQP is to provide a lightweight
HLL for generating PIR subroutines while adhering to a Perl 6
syntax.

Some items not planned for NQP:

=over 4

=item * string interpolation

=item * listops

=item * quoted lists

=item * array and hash slices

=back

Of course, if we later decide that some item is vitally
important for NQP programs, we can add it -- but for now
the point is to maintain a minimal set of constructs.

