One more larger struct in the codegen test corpus.
This one was particularly aimed at making sure I hit all the hardest situations as trying to write the generators for NodeBuilders. It certainly did so! I found enough conceptual/design work to do that I'm actually going to park this here for a while, probably land this branch back to master before it gets any longer, and then approach things from some other angles for a while. In particular: We're going to need several *different* NodeBuilders for schema-typed nodes. The astute reader probably already noticed this, as it's implied by the `typed.Node{}.Representation() Node` method: that adds a second Node instance, and that means a second NodeBuilder. What's a little more fun yet is there might be more than two: for example, if we want the serial mode to support variation in field order for structs, that's another branch we need to account for somewhere... and, ordered vs unordered modes might need different structures of memory to do their job efficiently, so that means wholly different implementations of the interface. Whee. So. I'm thinking I might switch tack to knocking around in the (non-codegen) typed Node package for a while and making sure nothing looks wildly amiss over there while exploring these same features Then, when coming back here: looks like we're due for that breakdown of `EmitNodeBuilder{Detail...}` methods: and perhaps that's actually going to belong on a new type rather than glommed on flatly to `typeGenerator`... since there may be a n:1 relationship there!
Showing
Please register or sign in to comment