Prefer If Statements to Polymorphism
3 points
1 hour ago
| 1 comment
| htmx.org
| HN
christophilus
56 minutes ago
[-]
Well, I agree with all of this.

Locality of reasoning is priority #1 for me.

Also, if I want to add a field to a UI, and I have to touch 20 files to make that work, we have a problem. I have seen many codebases with this problem, and I have never received a justifiable explanation of why. The answer almost always boils down to, “We have a massive pile of dependencies because some FAANG company told us this was the way to build things.”

reply