Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    This is an interesting sort of "reverse" visitor pattern. There is an explicit type check, but it is hidden inside of the factory, and the use of the null object means that no one is the wiser. Commented May 28, 2015 at 0:41
  • Yes, interesting solution. Unfortunately, the actual method usage logic differs so much that it just won't fit into a no-op scheme... Otherwise I'd considered doing it :) Commented May 29, 2015 at 9:29