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

'start' is a sub in Rakudo; design docs suggest it should be a statement prefix #4288

Closed
p6rt opened this issue Jun 2, 2015 · 5 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Jun 2, 2015

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

Searchable as RT125312$

@p6rt
Copy link
Author

p6rt commented Jun 2, 2015

From @smls

According to http://design.perl6.org/S04.html#line_1380 'start' should probably be a statement prefix.

However, in Rakudo it is currently a subroutine​:

➜ start 41 + 2
Type check failed in binding &code; expected 'Callable' but got 'Int'
  in block <unit> at <unknown file>​:1

➜ say &start
sub start (&code, :catch(&catch)) { #`(Sub|49183056) ... }

Discussion​:

<smls> maybe I'm misinterpreting the design docs?
<smls> it's not super explicit about it.
<masak> "They parse the same as phasers" and `try` already working
  that way both seem to point to your conclusion.
<masak> also, it makes sense to me that `start` would take a blorst.

@p6rt
Copy link
Author

p6rt commented Jun 3, 2015

From @lizmat

Fixed by 211d7a1a1e034876f53e

On 02 Jun 2015, at 14​:53, Sam S. (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Sam S.
# Please include the string​: [perl #​125312]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125312 >

According to http://design.perl6.org/S04.html#line_1380 'start' should probably be a statement prefix.

However, in Rakudo it is currently a subroutine​:

➜ start 41 + 2
Type check failed in binding &code; expected 'Callable' but got 'Int'
in block <unit> at <unknown file>​:1

➜ say &start
sub start (&code, :catch(&catch)) { #`(Sub|49183056) ... }

Discussion​:

<smls> maybe I'm misinterpreting the design docs?
<smls> it's not super explicit about it.
<masak> "They parse the same as phasers" and `try` already working
that way both seem to point to your conclusion.
<masak> also, it makes sense to me that `start` would take a blorst.

@p6rt
Copy link
Author

p6rt commented Jun 3, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 6, 2015

From @Mouq

This is tested in S17-promise/start.t.

Closing as resolved :)

~Mouq

@p6rt
Copy link
Author

p6rt commented Jun 6, 2015

@Mouq - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 6, 2015
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

No branches or pull requests

1 participant