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

Exceptions lack examples #292

Open
rodrigob opened this issue May 25, 2018 · 2 comments
Open

Exceptions lack examples #292

rodrigob opened this issue May 25, 2018 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rodrigob
Copy link

In https://github.com/ponylang/pony-tutorial/blob/9cfbb3ee7e3e8adbc7b8d914ff440f9482ae8bea/expressions/exceptions.md#comparison-to-exceptions-in-other-languages

the pony exceptions are compared to other languages.
It is argued that not having error types or instances is better.
It would be great to point to some code examples for commonly used idioms regarding usage of the error feature.

In particular, if my try-else block can fail in two different ways, what is the recommended way to handle this inside the else ?
(splitting the try-else in two ? nesting ?)

I think "no exceptions" or "no exception values" tends to be as controversial as "no generics" (like Go did). So best to provide concrete "real world" examples.

@jemc
Copy link
Member

jemc commented Jun 1, 2018

This is definitely a controversial point, and I agree the docs could/should be expanded so we can make our case.

@rhagenson rhagenson added the good first issue Good for newcomers label Dec 16, 2020
@rhagenson
Copy link
Member

Someone could reasonably review how error is used in the stdlib for this issue. I am willing to work with someone on reducing observations in stdlib down to idioms which can be presented as readily understood examples.

@SeanTAllen SeanTAllen added the help wanted Extra attention is needed label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants