Skip to content

Commit

Permalink
Void → sink refs #1223
Browse files Browse the repository at this point in the history
Also deletes accidental MD, refs #2022
  • Loading branch information
JJ committed May 15, 2018
1 parent e241017 commit 345b37e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/Language/5to6-nutshell.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ first $coderef, @values, :k;
=begin item
C<&foo;> I<and> C<goto &foo;> I<for re-using the caller's argument list /
replacing the caller in the call stack>. Perl 6 can use either L<C<callsame>|/language/functions#index-entry-dispatch_callsame> for re-dispatching or L<C<nextsame>|/language/functions#index-entry-dispatch_nextsame> and L<C<nextwitch>|/language/functions#index-entry-dispatch_nextwith>, which have no exact equivalent in Perl 5.
replacing the caller in the call stack>. Perl 6 can use either L<C<callsame>|/language/functions#index-entry-dispatch_callsame> for re-dispatching or L<C<nextsame>|/language/functions#index-entry-dispatch_nextsame> and L<C<nextwitch>|/language/functions#index-entry-dispatch_nextwith>, which have no exact equivalent in Perl 5.
=begin comment
# TODO: Suggest .nextsame and .nextwith once they've been implemented in Rakudo.
Expand Down
10 changes: 5 additions & 5 deletions doc/Language/5to6-perlfunc.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -537,17 +537,17 @@ Currently unimplemented.
=item fork
There is no built-in `fork` function. While it's possible to call it using
There is no built-in C<fork> function. While it's possible to call it using
NativeCall, it's highly unlikely that the resulting process will be usable.
Perl 6 provides extensive support for, and internally uses, threads. However,
`fork` only clones the thread that called `fork`, resulting in a process that
C<fork> only clones the thread that called C<fork>, resulting in a process that
will be missing its other threads, which will have been in unknown states and
probably holding locks. Even if a Perl 6 program doesn't knowingly start any
threads, the compiler may create some of its own in the process of precompilation,
and the VMs that Perl 6 runs on also create their own internal worker threads for
doing things like optimization and GC in the background. Thus, the presence of
threads is pretty much assured, and there's no reasonable way to make `fork`
threads is pretty much assured, and there's no reasonable way to make C<fork>
reliably work in this case.
=head2 formats
Expand Down Expand Up @@ -2144,7 +2144,7 @@ to generate something which is not asked for.
Another use case is to create methods which are mutators when called
in void context but produce copies during assignment. It is generally
considered better form in Perl 6 not to do so, since users can quite
considered better form in Perl 6 not to do so, even more so because I<void> context does not exist in Perl 6, with the closest equivalent being I<sink> context, since users can quite
easily turn any copy-producing method into a mutator using the C<.=>
operator:
Expand All @@ -2156,7 +2156,7 @@ operator:
However if you have your heart set on using the same function
name for both operations, you can get most of the way there by mixing in
a C<.sink> method, which will be called when the result finds itself
in void context. There are some caveats however, so again, this is
in sink context. There are some caveats however, so again, this is
not advised:
multi sub increment($b is rw) {
Expand Down

0 comments on commit 345b37e

Please sign in to comment.