News for hackers. Stuff that matters.
Re:“Clean” Code, Horrible Performance by camgunz on Wednesday March 01, 2023 @01:04PM (#34985912)
Conversely it's really annoying to add a new method to each shape--you've got to open them all up and add shape-specific code for them with a bunch of boilerplate. With switch statements you just add one more function.

This is the "expression problem": https://en.m.wikipedia.org/wiki/Expression_problem

There are no comments on this comment yet.