Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the restrictions on members whose names match auto-generated properties #726

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Ms2ger
Copy link
Member

@Ms2ger Ms2ger commented May 10, 2019

Fixes #49.


Preview | Diff

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated
Note: Operations named "<code>add</code>", "<code>clear</code>",
or "<code>delete</code>" are allowed on read–write setlike
Setlike interfaces and their [=inherited interfaces=] must not have any [=regular operations=],
[=regular attributes=] or [=constants=] named
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This forbids

interface A { void entries(); };
interface B : A { readonly setlike<long>; };

but not

interface A { readonly setlike<long>; };
interface B : A { void entries(); };

Should it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a really good question.... Seems like disallowing it until there's a use case that might want it, and then deciding how it should work, is reasonable...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Ms2ger
Copy link
Member Author

Ms2ger commented Jun 17, 2019

@bzbarsky I think this is ready for another review.

@bzbarsky
Copy link
Collaborator

Sorry for the lag; work week interfered... Will look sometime this week.


Note: Operations named "<code>clear</code>", "<code>delete</code>",
or "<code>set</code>" are allowed on read–write maplike
Maplike interfaces, their [=inherited interfaces=], and any [=interfaces=] that
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth factoring out the "interface, its inherited interfaces, and all interfaces that inherit from it" concept so it can be reused, instead of copy/pasting it?

"<code>delete</code>", or
"<code>set</code>",
or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
[=constants=] with these names.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can interfaces inheriting from the read-write maplike have these things? Seems like they shouldn't...

"<code>add</code>",
"<code>clear</code>", or
"<code>delete</code>",
or have any [=inherited interfaces=] that have [=regular operations=], [=regular attributes=] or
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, what about interfaces that inherit from the read-write setlike?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Improve restrictions on attributes/operations when maplike/setlike are used
2 participants