Currently, the classes we generate are not very string conversion friendly. Many languages feature some kind of debugging print aid (like toString() or repr or stuff like that) that allows us to customize what would be printed out during to string conversion of an object.
From bird's eye perspective, there are two major variations of that feature:
- In some languages (Java, C#, at, to some extent, C++) it's easier to generate
toString-like method that would print out
- In some languages (Ruby, Python, PHP, etc), it's probably easier to implement relevant code in
KaitaiStruct that would achieve the same using reflection
Doing that should probably make debugging print much easier for all languages. Right now only Ruby and, to some extent, JavaScript, does sane debug printing.
Currently, the classes we generate are not very string conversion friendly. Many languages feature some kind of debugging print aid (like
toString()orrepror stuff like that) that allows us to customize what would be printed out during to string conversion of an object.From bird's eye perspective, there are two major variations of that feature:
toString-like method that would print outKaitaiStructthat would achieve the same using reflectionDoing that should probably make debugging print much easier for all languages. Right now only Ruby and, to some extent, JavaScript, does sane debug printing.