Prefer If Statements to Polymorphism

(htmx.org)

3 points | by birdculture a month ago ago

1 comments

  • christophilus a month 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.”