Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid copying all of the lhs into @args #5

Closed
wants to merge 1 commit into from

Conversation

patrickas
Copy link
Contributor

We only need $arity elements from the end of the @lhs so we just copy those into @Args (ignoring the last element if it ~~ Code)

@moritz
Copy link
Member

moritz commented Sep 15, 2010

applied, thanks.

lizmat added a commit that referenced this pull request Sep 6, 2014
lizmat added a commit that referenced this pull request Jun 25, 2016
This is basically just to get it out there and may be revoked at any
time before the next release.

It basically creates a copy of Array with aliases to the values:

  my @A = ^10;
  my @b = @a.cow;   # values are shared
  @b[5] = 42;       # element #5 no longer shared

This as a result of a question at The Perl Conference:
  Can you do "Copy-On-Write" in Perl 6?

I thought this could be useful.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants