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

Have you read the "Try-catch oneliner" proposal from 2019? #15

Open
mmkal opened this issue Aug 16, 2024 · 2 comments
Open

Have you read the "Try-catch oneliner" proposal from 2019? #15

mmkal opened this issue Aug 16, 2024 · 2 comments

Comments

@mmkal
Copy link

mmkal commented Aug 16, 2024

There's a long conversation about essentially the same proposal here: https://es.discourse.group/t/try-catch-oneliner/107/61

Proposed syntax there is

const [err, data] = try foo()

Which IMO is clearer than adding yet more punctuation. There's also a Function.try non-syntax alternative suggested since syntax additions can be very hard to get approved.

Is there a delegate who you worked with on this one? I am all for the debate being refreshed, but I didn't see a reference to this other proposal, so maybe I missed it, but if not it's worth reading/linking to.

@arthurfiorette
Copy link
Owner

Hi!

Thanks for sharing this link, I spent some time looking for a proposal for a similar idea but didn't found one.

I worked by myself on this proposal yet, but would love to get help from a delegate's.

@arthurfiorette
Copy link
Owner

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

2 participants