You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
The dual step means you'll trigger double the meta-object protocol traps. This is mostly a theoretical concern since if you have a weird proxy where [[GetOwnProperty]] and [[Get]] disagree, you're screwed anyway. But it feels inelegant.
However that doesn't seem to account for your desired semantics of distinguishing present vs. undefined-but-not-present. I argue in #35 this is bad semantics, so I think that'd be the best way to fix this :). I'm not sure if there are any others.
The text was updated successfully, but these errors were encountered:
To summarize, I think that just doing Get is reasonable for most options bags, because undefined is not a sensible value for the option and so can be treated equivalently to the option being unspecified, but if we are distinguishing between new Error('foo') and new Error('foo, { cause: e }) in general (cf #35) then we should still do so when e happens to be undefined.
https://tc39.es/ecma402/#sec-getoption is what Ecma 402 does: only a single Get(), with a default if the result is undefined. https://heycam.github.io/webidl/#es-dictionary similarly for the web platform.
The dual step means you'll trigger double the meta-object protocol traps. This is mostly a theoretical concern since if you have a weird proxy where [[GetOwnProperty]] and [[Get]] disagree, you're screwed anyway. But it feels inelegant.
However that doesn't seem to account for your desired semantics of distinguishing present vs. undefined-but-not-present. I argue in #35 this is bad semantics, so I think that'd be the best way to fix this :). I'm not sure if there are any others.
The text was updated successfully, but these errors were encountered: