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

Some reasons:
- Violates [ยง Attributes should behave like data properties](https://w3ctag.github.io/design-principles/#attributes-like-data) because dictionaries have copy semantics
- Copies are modifiable https://github.com/w3c/webrtc-extensions/issues/136

- creates a loophole for returning mutable dictionaries as attributes https://github.com/w3c/webrtc-extensions/issues/137

- [crbug 946659](https://bugs.chromium.org/p/chromium/issues/detail?id=946659) exacerbates this anti-pattern https://github.com/w3c/webrtc-extensions/issues/135


[ObservableArray\<T>](https://webidl.spec.whatwg.org/#idl-observable-array) says: _"The parameterized type T must not be a [dictionary type](https://webidl.spec.whatwg.org/#idl-dictionary), [sequence type](https://webidl.spec.whatwg.org/#sequence-type), [record type](https://webidl.spec.whatwg.org/#record-type), or [observable array type](https://webidl.spec.whatwg.org/#dfn-observable-array-type)."_ Any reason not to say the same about [FrozenArray\<T>](https://webidl.spec.whatwg.org/#idl-frozen-array)>?

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

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

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

Received on Tuesday, 13 December 2022 15:56:17 UTC