tc39 / proposal-cancelable-promises

Former home of the now-withdrawn cancelable promises proposal for JavaScript
Other
375 stars 29 forks source link

try/stop #60

Closed caub closed 7 years ago

caub commented 7 years ago

Just a neutral idea, I was reading Why Else and I thought that stop (e) {..} or .stop(e=>{..}) could make sense, it has the semantic of cancellation to me, and is clear, unambiguous.

But it adds one more language keyword as a drawback

domenic commented 7 years ago

See the "Why Else" document for why we have to reuse an existing keyword. I would have preferred "except" or "recover" myself, but unfortunately it's future-hostile.

caub commented 7 years ago

Ok, I see, the transition with existing code isn't easy