Re: [whatwg/webidl] FrozenArray<SomeDictionary> seems like a bad idea. (Issue #1243)

> In some sense, a Promise is just another interface (used to be), with no requirement to act one way or another.

The Web IDL `Promise<T>` type does have an interface-like mapping to a specific ES Promise object by identity, yes. It also associates a conversion algorithm with that Promise’s eventual settled value (which can also lead to firing unhandledrejection events). Since the conversion happens only zero-or-one times, it’s sound in a letter-of-the-law sense. On the other hand this indirection-by-promise-wrapper amounts to a slightly worse version of what you’d get by adding the “missing” FrozenArray conversion steps that, by “memoizing” the first result, would permit `FrozenArray<SomeDictionary>` to be sound too.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1243#issuecomment-1351762386

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1243/1351762386@github.com>

Received on Wednesday, 14 December 2022 16:52:43 UTC