this post was submitted on 25 Oct 2026
372 points (95.1% liked)

Programmer Humor

33844 readers
833 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 

Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.

you are viewing a single comment's thread
view the rest of the comments
[–] TheMightyCat@ani.social 0 points 4 days ago (1 children)

One utility function somewhere vs runtime polymorphism everywhere?

Yes.

[–] SpaceNoodle@lemmy.world 0 points 4 days ago (1 children)

You just reinvented polymorphism with extra jank.

[–] TheMightyCat@ani.social 0 points 4 days ago* (last edited 4 days ago)

How is it jank to put one utility function in a file somewhere you never need to look at again?

That is if you even want to do the assert since if the type doesn't have the method it won't compile in the calling function anyway but since you mentioned the strict check it's fully possible.

And why isn't it jank to write virtual, final, and override everywhere and have the entire codebase infested with vtables.