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

Rethink Dtype class hierarchy #472

Open
MJJoyce opened this issue Dec 20, 2022 · 0 comments
Open

Rethink Dtype class hierarchy #472

MJJoyce opened this issue Dec 20, 2022 · 0 comments

Comments

@MJJoyce
Copy link
Member

MJJoyce commented Dec 20, 2022

We should rethink the way we're structuring our classes in dtype.py. Currently we have everything inheriting from Primitive type and it's turned into a bit of a messy catchall for all sorts of stuff. The inheritance of Complex types from it ends up being, at best, meaningless since the vast majority overwrite the encode / decode methods. Things like Time40 ends up shoehorned in by setting a 4-byte primitive type and then manually overwriting the byte/bit counts to support the 5-byte type.

TLDR: PrimitiveType isn't great.

I think we'd be better served by throwing an abstract base class in there to mandate the API that we require. It would likely make the user-facing portion of it more coherent as well.

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