Choose Your Own Design Patterns!
summary
An interactive session uses audience voting to demo three concrete examples: a Java Visitor that fixes single-dispatch with extra interfaces and boilerplate but compiles and runs once refactored; a Java Adapter implemented as a wrapper class; and a Builder-heavy cake constructor. Each Java solution compiles and works but adds types and indirection. Kotlin alternatives remove that overhead using sealed classes + when for double dispatch, extension functions instead of adapters, and the primary constructor (with named/default params) instead of builders.
AI-written summary · about
