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

add more detail about implicit return #388

Closed
jdv opened this issue Feb 10, 2016 · 8 comments
Closed

add more detail about implicit return #388

jdv opened this issue Feb 10, 2016 · 8 comments
Assignees
Labels
docs Documentation issue (primary issue type)

Comments

@jdv
Copy link
Contributor

jdv commented Feb 10, 2016

For instance, note that { "ret"; CATCH { default {} } } will not return "ret" which may be
counter-intuitive to some.

@salortiz
Copy link
Contributor

I hope than in a future v6.x the non r-value phasers will be in some way re-moved/hidden/separated from the compiled execution tree of the block.
Meanwhile, its recommended position in the block should be at the top.

@MadcapJake
Copy link
Contributor

Agreed, this tripped me up. To my eye, CATCH { ... } seems similar to a conditional branch but only runs if an error occurs, so with that assumption, it follows that the previous line would be the implicitly returning one. While I would enjoy that slight change to the semantics, it's definitely important we get this documented. The language/exceptions page could use at least one example showing a try/catch in a returning block and some discussion of this idiosyncrasy.

@AlexDaniel AlexDaniel added docs Documentation issue (primary issue type) needs research labels Mar 24, 2016
@AlexDaniel
Copy link
Member

I think this may fit our traps page. I've been banging my head against this issue a couple of times.

@JJ
Copy link
Contributor

JJ commented Mar 10, 2018

So the position here is to add something to the traps page, right?

@AlexDaniel
Copy link
Member

@JJ I think so, yes.

@JJ JJ self-assigned this Mar 10, 2018
@JJ
Copy link
Contributor

JJ commented Mar 10, 2018

OK, I self-assign it, please feel free to help.

@AlexDaniel
Copy link
Member

@JJ any progress?

@JJ
Copy link
Contributor

JJ commented May 5, 2018

Not really. I'll de-assign it, just in case you want to work on it.

@JJ JJ removed their assignment May 5, 2018
@JJ JJ added this to the May SQUASHathon milestone May 6, 2018
@JJ JJ self-assigned this May 6, 2018
JJ added a commit to JJ/my-raku-examples that referenced this issue May 6, 2018
@JJ JJ closed this as completed in 8af5101 May 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type)
Projects
None yet
Development

No branches or pull requests

5 participants