407
you are viewing a single comment's thread
view the rest of the comments
[-] cerement@slrpnk.net 45 points 7 months ago

Why Isn’t Functional Programming the Norm? – Richard Feldman

  • objects and methods are just structs and procedures
  • encapsulation is just modular programming
[-] azertyfun@sh.itjust.works 4 points 6 months ago

Anyone who praises FP is either a student, works primarily in academia, or otherwise never had to look at a deep stack trace in their life.

Every time a production system spits out a backtrace that's just 15 event loop calls into a random callback, I lose 6 months life expectancy. Then I go look at the source, and the "go to definition" of my LSP never works because WHY WOULD IT, IT'S ALL FUNCTIONAL hapi.register CALLS

I hate it I hate it I hate it I hate it. I support UBI because the people pushing functional programming in real production systems should be reassigned to gardening duties.

[-] Miaou@jlai.lu 9 points 6 months ago

I have the same problem with oop. 10 levels of encapsulated calls just to see you were in an overridden methods without enough data to find out which implementation it was. Ugh

[-] azertyfun@sh.itjust.works 4 points 6 months ago

I mean, bad programming sucks regardless of the "paradigm" (and vice-versa, mostly). But as someone whose job it often is to sift through production logs hunting for an issue in someone else's component, at least I have a chance with OOP, because its behavior is normally predictable at compile time. So with the source and the backtrace I can pretty reasonably map the code path, even if the spaghetti is 300 calls deep.

Now where shit really hits the fan is OOP with dependency injection. Now I'm back to square 1 grepping through 15 libraries because my LSP has no idea where the member comes from. Ugh.

[-] arxdat@lemmy.ml 2 points 6 months ago

I'm not advocating one way or the other, but I would gladly take on the gardening duties :D

this post was submitted on 30 May 2024
407 points (100.0% liked)

Programmer Humor

32731 readers
493 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS