There are a couple of issues:
- When you
plus() two ViewEnvironments, entries are completely replaced, there are no merge hooks
- When you
plus() two ViewRegistry's, if they have any redundant entries an exception is thrown
For the former, perhaps we can build optional merge hooks into ViewEnvironmentKey?
For the latter, I'm hard pressed to think of any bugs we have caught by throwing, but I can come up of lots of examples where we had to struggle mightily to work around it. How about if we document that entries in the registry on the right in a ViewRegistry.plus() call will clobber those on the left? We could offer a strict variant, or even default to it, but I can't really imagine when I'd use it.