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
adjust representation of internal Items #36
Conversation
Why do we keep the raw representation around? Since changes in the typed representation aren't reflected in the raw representation, I don't see why we should. Either we should disallow parsing under two different types or we should come up with a scheme to propagate changes between the two. |
I don't follow. The raw data is kept to parse a new header if the type is |
I can set the value of a header's typed representation, then parse it under a new representation and I won't get the updated value. I think that would be a non-trivial source of bugs, and also makes libraries much more dependent on one another. |
Oh I see. So, you think we should stick with the enum, and return None if
|
I've got a branch somewhere with most of a representation that just converts to the raw representation if you ask it for a different type. I'll probably PR later tonight or tomorrow. |
In that case, it's possible that a previous representation dropped some
|
That is also possible. I think both representations have their pros and cons and I'm not sure which is best. |
At minimum this can be refactored to not store the TypeId or the raw representation if we decide to not allow re-parsing. |
adjust representation of internal Items
fixes #35
@reem I think this takes care of it.