I wonder if we should have "parent transformations" at all. It seems like a
YAGNI violation, and if you want to do multiple transformations, a cleaner
design (in the sense of separating concerns) would be one with an explicit
composite pattern, as in: "transform=chain_transformations(trans1, trans2)". (It
wouldn't have to be called "chain_transformations", of course.)
Without parent transformations, I like the solution with
"transform=adapt_costs(one)", as it would require no further code changes and is
not terribly verbose. We could add convenience wrappers like "ignore_costs", but
perhaps it's better to only start doing that when and if we get annoyed with the
longer syntax.
|