-
Notifications
You must be signed in to change notification settings - Fork 200
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
Templates/generics #135
Comments
I've proposed approximately the same syntax some time ago: #78 (comment) Could you show what you propose for usage of your example template? |
This was just an example. The use cases are strings and other arrays prepended by count of elements, wrappers for data structures, where first structure must have certain type (see flac.ksy, the first frame is always metadata one), etc. |
I would like to point out that its probably worth dictating how Like for example, what should happen if one of the template parameters is called
|
Also, another consideration is depth and complexity of parameterization. How should Kaitai react to parametric or template types being passed as template parameters? Can we add an option to limit or permit these behaviors? For example, should Katai (and how should Kaitai) abstract this signature: class Template<T extends AnotherTemplate<TypeParameter>> { ... } // TypeScript |
I think we need templates/generics, don't we?
the proposed syntax:
All the template arguments should be known at compile time. For languages having templates/generics they should be used.
The text was updated successfully, but these errors were encountered: