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

Consider sealing the IonElement interfaces in the next major version. #93

Open
popematt opened this issue Mar 18, 2024 · 1 comment
Open

Comments

@popematt
Copy link
Contributor

Whenever we create a new major version of ion-element-kotlin, we should discuss sealing the IonElement interfaces. The result of the discussion should be either sealing the interfaces or clearly documenting why we think it's a good idea that the interfaces are open.

@popematt
Copy link
Contributor Author

Here are some points (both for and against) that were brought up in #88

  • A user might want to create their own IonElement implementation in order to e.g. have a lazy implementation or to be able to create a view over data that is not Ion.
  • It's easy for someone to implement IonElement in a wrong way.
  • Users would prefer carefully constructed abstractions rather than implementing IonElement themselves.
  • There appear to be places that are not designed and documented for inheritance. ("Design and document for inheritance or else prohibit it" -- Joshua Bloch.)
  • If IonElement is a sealed interface, then any new implementations have to go through us (the Ion maintainers) in some form—making us a potential bottleneck for innovation.

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

No branches or pull requests

1 participant