Sealed-Classes

Visitor

A page editor's three block classes keep gaining operations. Learn how double dispatch lets one accept method serve any number of visitors, what it costs, and when a sealed interface and a pattern switch is the better answer.

November 26, 202611 minutes

Switch Statements

One new device, three silent bugs. Learn why the smell is the same switch repeated, how to replace it with a class per kind, and when an exhaustive switch is the right answer.

November 25, 20269 minutes