tc39 / proposal-is-error

ECMAScript Proposal, specs, and reference implementation for Error.isError
https://tc39.es/proposal-is-error/
MIT License
62 stars 2 forks source link

Path to Stage 4! #7

Open ljharb opened 2 months ago

ljharb commented 2 months ago

Stage 4

Stage 3

Stage 2.7

~Stage 2~

~Stage 1~

michaelficarra commented 1 month ago

@ljharb In the other places we pierce proxies, we call ValidateNonRevokedProxy in your step 3a. We may as well follow that pattern.

On the question of proxy piercing, this would make Object.prototype.toString conflict with Error.isError (since only isError will pierce), unlike Array.isArray which pierces in both places. I don't think that's a good idea.

ljharb commented 1 month ago

ah, good point. That might be another very strong argument for #8 to not pierce proxies.

ljharb commented 1 week ago

ping @chicoxyzzy @bakkot @michaelficarra for review, i'm going for 2.7 at the next plenary

michaelficarra commented 1 week ago

LGTM. Is the separate AO necessary? I would inline it.

ljharb commented 1 week ago

It's not necessary right now (now that the proxy piercing is gone), but future proposals will make use of it. It'd be fine to extract it at that time, instead, if you prefer.

bakkot commented 1 week ago

LGTM though I would want something https://github.com/whatwg/webidl/pull/1421 to be at least approved in principle as well. The process doesn't currently have a stage for which "necessary host integration work is done" is an entry requirement, but either 2.7 or 3 seem appropriate. (If you want to make the case that it can happen between 2.7 and 3 that's fine by me also.)

ljharb commented 1 week ago

Thanks! I agree that it must be approved before 3; and I'm hoping it will be approved before 2.7, but I also agree that it needn't block 2.7 as long as there's no feedback requiring a different direction.

chicoxyzzy commented 1 week ago

LGTM