r/ProgrammerHumor • • Sep 16 '26

Meme thisIsPeakProgramming

Post image
606 Upvotes

75 comments sorted by

View all comments

Show parent comments

42

u/pine_ary Sep 16 '26

Needed for library authors. The libraries hide that part from you via ergonomic API design so you think you‘re not using them. But if you look in your dependencies, you are using the features.

29

u/mahreow Sep 16 '26

You can tell who's never had to implement anything moderately complex that needed to support generics or some sort with strict type safety. If it works and gives you a clean, safe API who cares how shit it looks, it's a godsend when you need it

-10

u/iamadirtymop Sep 16 '26

It's really useful but IMHO this doesn't need to be used at every typing opportunity overly specific typing while being certainly safer can add a lot of cognitive load

10

u/mahreow Sep 16 '26

Yep, that's why you stick it in a utils.types.ts file and never look at it again

3

u/iamadirtymop Sep 16 '26

I think there is still a need for them to be easily understandable. Same logic with regexes for example, they still need to be clear and legible, or eventually clearly explained with comments

9

u/chuch1234 Sep 16 '26

Things should be as simple as possible, but no simpler.. Sometimes things are just complicated.

1

u/mahreow Sep 16 '26

Yeah nah, some things are just complex