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

'will begin' doesn't bind the variable to $_ in Rakudo #3200

Closed
p6rt opened this issue Aug 1, 2013 · 3 comments
Closed

'will begin' doesn't bind the variable to $_ in Rakudo #3200

p6rt opened this issue Aug 1, 2013 · 3 comments
Labels
NYI Features not yet implemented

Comments

@p6rt
Copy link

p6rt commented Aug 1, 2013

Migrated from rt.perl.org#119109 (status was 'resolved')

Searchable as RT119109$

@p6rt
Copy link
Author

p6rt commented Aug 1, 2013

From @masak

<lizmat> S04​:1454 states "These have the advantage of passing the
variable in question into the closure as its topic"
<lizmat> I wonder what that would mean for cases such as
<lizmat> my @​a will begin { say $_.WHAT } # Array ?
<masak> r​: my @​a; BEGIN { say @​a.WHAT }
<camelia> rakudo 4a608a​: OUTPUT«(Array)␤»
* masak nods
<lizmat> r​: my @​a; $_ := @​a; say $_.WHAT # more like this, I guess
<camelia> rakudo 4a608a​: OUTPUT«(Array)␤»
<lizmat> r​: my @​a will begin { say $_.WHAT } # Array ?
<camelia> rakudo 4a608a​: OUTPUT«(Mu)␤»
<masak> I don't see why it shouldn't be (Array)
* masak submits rakudobug
<lizmat> masak​: don't bother, it's NYI
<lizmat> one of the blockers I'm banging my head against
<masak> ok, submitting as [NYI] instead of [BUG] :)

The last two evaluations should both print '(Array)'.

@p6rt
Copy link
Author

p6rt commented Sep 15, 2015

From @perlpilot

Seems invented now​:

16​:02 <PerlJam> m​: my @​a will begin { say $_.WHAT }
16​:02 <+camelia> rakudo-moar 5daff4​: OUTPUT«(Array)␤»

There's also a test in S04-declarations/will.t

On Thu Aug 01 01​:33​:35 2013, masak wrote​:

<lizmat> S04​:1454 states "These have the advantage of passing the
variable in question into the closure as its topic"
<lizmat> I wonder what that would mean for cases such as
<lizmat> my @​a will begin { say $_.WHAT } # Array ?
<masak> r​: my @​a; BEGIN { say @​a.WHAT }
<camelia> rakudo 4a608a​: OUTPUT«(Array)␤»
* masak nods
<lizmat> r​: my @​a; $_ := @​a; say $_.WHAT # more like this, I guess
<camelia> rakudo 4a608a​: OUTPUT«(Array)␤»
<lizmat> r​: my @​a will begin { say $_.WHAT } # Array ?
<camelia> rakudo 4a608a​: OUTPUT«(Mu)␤»
<masak> I don't see why it shouldn't be (Array)
* masak submits rakudobug
<lizmat> masak​: don't bother, it's NYI
<lizmat> one of the blockers I'm banging my head against
<masak> ok, submitting as [NYI] instead of [BUG] :)

The last two evaluations should both print '(Array)'.

--

-Scott (PerlJam/perlpilot)

@p6rt
Copy link
Author

p6rt commented Sep 15, 2015

@perlpilot - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Sep 15, 2015
@p6rt p6rt added the NYI Features not yet implemented label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NYI Features not yet implemented
Projects
None yet
Development

No branches or pull requests

1 participant