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

Justify the existence of LongPrimitive, SymbolPrimitive and BoolPrimitive in their kdoc #79

Open
dlurton opened this issue Jun 13, 2021 · 0 comments

Comments

@dlurton
Copy link
Member

dlurton commented Jun 13, 2021

This issue is example number 8,274,783 why good documentation is needed: Hours after creating this issue, I remembered why LongPrimitive, SymbolPrimitive, etc, exist: they need to inherit from DomainNode which allows for the generic visitor functions like visitDomainNode, and walkDomainNode, etc, which are invoked for every node and leaf in a tree.

Thus, this factoid should be added to the documentation of these types.

Original issue text follows.

We should consider deleting LongPrimitive, SymbolPrimitive and BoolPrimitive and instead use the IonElement equivalent of these: IntElement, SymbolElement and BoolElement.
The existence of these classes doesn't seem terribly justified given that their IonElement equivalents already encompass all of the same functionality. If this were completed then: all we'd need to do to complete #46 is add a few tests, and it would significantly simplify adding support to all of the other Ion types to Kotlin target.
If we discover a better reason than described in the kdoc of these types, and decide instead not do this, then we should include that justification in the explanation given in the kdoc of these classes.

@dlurton dlurton changed the title Consider using Element interfaces for primitive types Consider using narrowed IonElement interfaces for primitive types Jun 13, 2021
@dlurton dlurton changed the title Consider using narrowed IonElement interfaces for primitive types Justify the existence of LongPrimitive, SymbolPrimitive and BoolPrimitive in their kdoc Jun 14, 2021
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