[whatwg/webidl] Namespaces disallow ObservableArray attributes, but allow other interfaces (Issue #1134)

In #1000 a contradiction was noted with ObservableArrays on namespace objects, which was resolved by banning them from being on namespace objects. In <https://github.com/whatwg/webidl/issues/1000#issuecomment-1113645010> @domenic noted that this was justified by namespaces being intended just as grabbags of functions, and possibly simple data types; ObservableArrays are neither and so don't fit the philosophy of what's appropriate on namespaces. (In essence, the namespace object is meant to just be a way of grouping related names together, and should itself be basically identical to instead just concating the namespace's name with its attribute's/method's names and putting them on the global instead.)

However, namespaces allow other interface types; they're restricted to being readonly on the namespace, but the attributes can still be internally mutable and arbitrarily complex. Should we restrict namespaces attributes to just the "simple" types (basically all the ones that map to primitives) as well? If not, then the OA restriction seems oddly arbitrary - an interface with indexed getters is still allowed, for example, which is just a worse version of an OA most of the time.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1134
You are receiving this because you are subscribed to this thread.

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

Received on Friday, 29 April 2022 19:58:41 UTC