Skip to content

Rogue 'panic' -> 'fail' in guide. #18833

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

Closed
wants to merge 1 commit into from

Conversation

jeffparsons
Copy link
Contributor

Should refer to handling panicking tasks like any other computation
that may fail, not any other computation that may panic.

Should refer to handling panicking tasks like any other computation
that may _fail_, not any other computation that may _panic_.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

@steveklabnik
Copy link
Member

Hmmmmmmm, I think this one is actually a bit ambiguous! We're talking about Results... I can see this sentence either way. Interesting.

@jeffparsons
Copy link
Contributor Author

It looks to me like an accidental change from the fail!->panic! rename.

This task will randomly panic or succeed. `task::try` returns a `Result`
type, so we can handle the response like any other computation that may
panic.

I can't parse any reasonable meaning from it this way, given that there is no way to recover a task from panicking.

Whereas the point of task::try is to abstract over the fact that there's a potentially panicky task producing a result, allowing you to use your normal (return value based) error handling machinery to deal with it, just like almost all other non-panic types of failures. So with 'panic' changed back to 'fail' it communicates something meaningful.

I'm trying to find meaning in the sentence as it stands, and I'm failing miserably. (But at least I'm not panicking! 😄)

@brson
Copy link
Contributor

brson commented Nov 10, 2014

Thanks @slashgrin.

bors added a commit that referenced this pull request Nov 12, 2014
Should refer to handling panicking tasks like any other computation
that may _fail_, not any other computation that may _panic_.
@bors bors closed this Nov 12, 2014
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.

5 participants