Re: [heycam/webidl] Reduce the restrictions on members whose names match auto-generated properties (#726)

bzbarsky requested changes on this pull request.



> -Interfaces with iterable declarations must not
-have any [=interface members=]
-named "<code>entries</code>", "<code>forEach</code>",
-"<code>keys</code>", or "<code>values</code>",
-or have any [=inherited interfaces=]
-that have [=members=] with these names.
+Interfaces with iterable declarations must not have any [=regular attributes=] or [=constants=]
+named
+"<code>entries</code>",
+"<code>forEach</code>",
+"<code>keys</code>", or
+"<code>values</code>",
+or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
+[=constants=] with these names.
+
+Note: Operations with these names are allowed on interfaces with iterable declarations and will

Why this change?  Regular operations with these names didn't use to be allowed, and they still shouldn't be, imo.

> +or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
+[=constants=] with these names.
+
+Maplike interfaces must not have any [=regular operations=] or [=constants=] named
+"<code>size</code>",
+or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
+[=constants=] with that name.
+
+Read–write maplike interfaces must not have any [=regular attributes=] or [=constants=] named
+"<code>clear</code>",
+"<code>delete</code>", or
+"<code>set</code>",
+or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
+[=constants=] with these names.
+
+Note: Operations with these names are allowed on maplike

Again, looks wrong.  The existing "can be overridden" thing was for methods that might need to be hooked because they modify the map and might need to update other internal data structures.  But we don't really want hooking for random read operations, right?

> +or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
+[=constants=] with these names.
+
+Setlike interfaces must not have any [=regular operations=] or [=constants=] named
+"<code>size</code>",
+or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
+[=constants=] with that name.
+
+Read–write setlike interfaces must not have any [=regular attributes=] or [=constants=] named
+"<code>add</code>",
+"<code>clear</code>", or
+"<code>delete</code>",
+or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
+[=constants=] with these names.
+
+Note: Operations with these names are allowed on setlike

Same here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/726#pullrequestreview-236187736

Received on Friday, 10 May 2019 16:06:56 UTC