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

Read-only and mutable abstract collections #53

Closed
ilya-g opened this issue Oct 15, 2016 · 2 comments
Closed

Read-only and mutable abstract collections #53

ilya-g opened this issue Oct 15, 2016 · 2 comments
Labels

Comments

@ilya-g
Copy link
Member

ilya-g commented Oct 15, 2016

Discussions about the Read-only and mutable abstract collections will be held here.

@damianw
Copy link

damianw commented Oct 20, 2016

Since Kotlin has default interface implementations, would it be better (or possible) to implement any of these as interfaces instead of abstract classes?

@ilya-g
Copy link
Member Author

ilya-g commented Oct 22, 2016

@damianw Interfaces cannot have state, cannot implement members of Any (namely hashCode, equals and toString). Also when two unrelated interfaces declare the same member it burdens an implementor of them both to have an override to select which one to use.

Making abstract mutable collections become interfaces would render impossible to reuse JDK implementations.

ilya-g added a commit that referenced this issue Dec 4, 2016
@ilya-g ilya-g closed this as completed Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants