Perl 6
SMOP Late Context Propagation: Revision 2

Perl is, historically, a context-oriented programming language. In Perl 5, the modules "overload" and "Contextual::Return" exposes the possibilities of this feature. Perl 6 takes this one step further, since the lazyness is influenced by the context in which the values are used.

The problem with all this lazyness, is that in Perl 6 it's not always possible to determine the context in which a value will be used. Perl 6 introduces the concept of Capture in place of the references in Perl 5. A reference in Perl 5 always imply scalar context, while a capture in Perl 6 is actually a way to delay the context attribution.

The most practical implication of that design is that "want" does not always have how to provide the precise information on how the value is being used.

Perl 6 also defines a new type of context, which is the Slice context, which presents some very new concepts, specially for those coming from Perl 5. For instance:

  my @@slice = map { foo() } bar();

The variable @@slice will then contain a bidimensional array where the first dimension lists every map iteration, and the second dimension contains the return of each map iteration without forcing any context.

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.