arthurfiorette / proposal-safe-assignment-operator

Draft for ECMAScript Error Safe Assignment Operator
https://arthur.run/proposal-safe-assignment-operator/
MIT License
1.07k stars 11 forks source link

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

Open mmkal opened 3 weeks ago

mmkal commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

https://es.discourse.group/t/safe-assignment-operator/2111