Yielding accessors and throwing callers

Years ago I discovered that the part of yielding accessors after the yield was not running when an error was thrown from the yielded-to code, and was alarmed… you might even say outraged. Now I notice that SE-474 specifies that the code after yield does run in that case, which would have satisfied my 2020 self.

The only problem: I have, since the late 1990s, been mistaken about the importance of cleanup. TLDR; When an error is thrown correct code is obliged to discard any partially-mutated state, so with two rare exceptions, trying to uphold invariants is misguided. For a more complete discussion, see here. I feel obliged to say something now just in case there are no reasons other than what I posted back in 2020 to run the post-yield code. I note also that running that code robs some accessors, like that of Dictionary, of commit-or-rollback semantics, because the ephemeral projected value will be written back regardless.

Fortunately for my fragile ego this means I'm far more right about the irrelevance of try marking than I thought previously. But I know everybody loves the sense of security they get from it, so I don't think that changes anything.