-
Notifications
You must be signed in to change notification settings - Fork 155
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
Document DataTypes and fix some non-exhaustive warnings #225
base: master
Are you sure you want to change the base?
Conversation
While current class naming is less than ideal, I wouldn't really agree to most of these changes:
In other words, let's discuss such renames first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous message.
That semantic is used by the code generator. I have researched all the uses of types and don't see a single scenario where this is violated. Of course, languages with GC, such as Java, doesn't have that semantic reflected in the code, but that doesn't mean that it is missing. Moreover, the proposed names are already implicitly assumed in the code: just look at the presence of the property (In fact, I don't see much sense in dividing into Owned/Borrowed for case Owned... | Borrowed... => ... In rare cases where this is not true you always can use case t: ...Type if t.isOwning => ... )
Actually, I had Rust in the mind and I think, that Rust terminology fits there very well. I don't see how the definition of slice in Python contradicts the intended name? Slice is part of an array (including the entire array). Slice assumes that this part can be extracted without copying, which may not be done in some languages, but this is only an implementation detail. If you want, let's refer to the definition from wikipedia:
In JavaScript, slice is a just a method declared in the |
In order to move forward I've removed the renames here, but I'll propose their in a new PR later |
Last commit fixes ErrorMessagesSpec test for
|
Ping |
@GreyCat, is it in the good state now for merge? I started again to documenting types to understand their purpose and remembered, that I already did that. I would appreciate if I could see these comments in the code rather than keep in mind. |
42e2a43
to
ec0d791
Compare
@GreyCat, @generalmimon, I see that you have some activity in the project recently. Could you find a time to review my PRs, for example, this? |
@GreyCat, @generalmimon, could you explain what blocking this from merging? Non-sealed |
Part of them already was sealed, so there is no reasons to not seal other
Both ArrayTypeInStream and CalcArrayType the only existing successors of the sealed class TypeDetector so we can do that simplification
Document DataType classes and fix 2 related non-exhaustive warnings.
The following warnings were fixed (from this run):
The following error
converted into this error:
This error is fixed in kaitai-io/kaitai_struct_tests#95