Finish the new basic implementation of 'any'.
What it does is simple: an 'anyBuilder' will either delegate to a map builder, or a list builder, or do a scalar build (directly, because there's not enough to do there to justify using any indirection), *OR* even simply hang onto and pass through another Node. The tests ensure that it can be used transparently to pass all the string tests (yay) as well as all the map tests (yayy!) including those that exercise recursion (yayyy!!). In addition to demonstrating that the 'any' code works correctly, it's also a nice demostration of reusable tests and behavioral specifications paying off. (There's more work to do here to clean them up, standardize naming, etc, but it's a nice start.) The 'anyInhabitedBy{Kind}' stuff stamped out at the bottom is... well, committing it for posterity, but in fact I'm going to remove that in the very next commit, as well as some docs on the subject from a few commits ago that are now showing as incorrect: the idea of the style of a node varying based on how it was produced is really... *cough* I'm not sure how I got that in my head; it clearly doesn't fly right.
Showing
Please register or sign in to comment