00:04
<ljharb>
i'm confused, so it'd be an object but Object.getOwnPropertyDescriptor could ever throw on it? that's breaking an existing invariant.
00:05
<rbuckton>
Not really. Object.getOwnPropertyDescriptor on a Proxy can throw if they throw in the getOwnPropertyDescriptor trap.
00:07
<Mathieu Hofman>
I still think that no value would be less surprising for existing usages, but throwing is technically legal (but I find that more exotic)
00:09
<shu>
can't all MOPs throw because of Proxies
00:13
<shu>
I still think that no value would be less surprising for existing usages, but throwing is technically legal (but I find that more exotic)
look man if you wanna propose to unship Proxies i'm on board!!
00:15
<Mathieu Hofman>
Oh proxies are definitely opening a lot of can of worms I'd rather not be open
04:27
<ljharb>
ok well then let’s please not repeat any of the horrific decisions Proxy made
14:35
<snek>
don't unevaluated module namespaces throw in inconvenient places as well
14:37
<nicolo-ribaudo>
Only on [[Get]] due to tdz
14:38
<nicolo-ribaudo>
Which is annoying but like objects with getters
14:39
<snek>
but its GetOwnProperty calls Get
14:40
<nicolo-ribaudo>
Mh yeah
14:41
<snek>
https://github.com/tc39/ecma262/issues/1209
17:50
<shu>
ok well then let’s please not repeat any of the horrific decisions Proxy made
the horrible decision being that user code is run?
17:51
<shu>
i mean there's no compelling argument to be made against not throwing because there is no alternative world where you don't have to check for MOPs throwing
17:51
<shu>
so there's no decision to "repeat", it's not another case of throwing you have to guard against
17:52
<ljharb>
without proxy Object.getOwnPropertyDescriptor never throws afaik
17:53
<rbuckton>
without proxy Object.getOwnPropertyDescriptor never throws afaik
Except for null and undefined
17:54
<ljharb>
lol sorry yes, i meant never throws on an object
17:55
<rbuckton>
And host objects could potentially throw
17:56
<shu>
"if we ignore this part of the language, this property holds" is not a design invariant...
17:56
<rbuckton>
major host builtins don't but who knows with NAPI
17:59
<rbuckton>
The only thing we probably could rely on as a basis in the language is that Object.getOwnPropertyDescriptor on a TypedArray backed by SharedArrayBuffer is racy.
17:59
<rbuckton>
Which is why I argued that reaching for an API means unsafe is implied.