Great post, although I would like to know his approach for handling the last case. There is a related post: "Cleaner, more elegant, and harder to recognize"
https://devblogs.microsoft.com/oldnewthing/20050114-00/?p=36...
https://devblogs.microsoft.com/oldnewthing/20050114-00/?p=36...