this post was submitted on 11 Jan 2026
357 points (93.0% liked)

Programmer Humor

28398 readers
949 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] potatoguy@lemmy.eco.br 24 points 1 day ago (3 children)

Hear me out:

Mixing OOP and functional code to abstract the shit out of everything making 5k loc in around 500 loc in java. You can do magic using this trick.

[–] termaxima@slrpnk.net 2 points 20 hours ago

Yes, you can make money and electricity magically disappear !

[–] passepartout@feddit.org 21 points 1 day ago (3 children)

Functional programming in Java is kind of an afterthought and it shows. That's one of the reasons why Scala was created!

[–] Custodian6718@programming.dev 1 points 6 minutes ago* (last edited 4 minutes ago)

I mean Yeah it is an afterthought in the Sense of that Java was Originally an oop Language but fp in Java was implemented very sensibly imo. I use functional Programming in Java a Lot and try to make Everything immutable where I can and honestly coding like that feels clean and very practical.

[–] red_tomato@lemmy.world 11 points 1 day ago (2 children)

The FP in Java is still leagues better than whatever the C++ committee cooked up.

[–] marcos@lemmy.world 11 points 1 day ago

Just let C++ die already, and stop pretending it's a reasonable thing to compare other languages with.

If you can't do it in C, you are better in Java, Python, Haskell, whatever.

they didnt cook it, they air fryed it to a crisp burn

[–] potatoguy@lemmy.eco.br 10 points 1 day ago (1 children)

Yeah, Scala is the GOAT, but while I can't use, why not final everything, use 300 streams and pass Suppliers around?

(I'm building a lot of libraries at work)

[–] silasmariner@programming.dev 4 points 1 day ago (1 children)

Do people still use vavr? When I wasn't allowed to use scala that made up for a fair few shortcomings but it's probably less relevant than it used to be

[–] potatoguy@lemmy.eco.br 4 points 1 day ago* (last edited 1 day ago) (1 children)

I didn't know about vavr, I think a lot of things from it were added since Java 17, but this Try seems cool.

Edit: Either would be nice too. I'm going to test some of those things, thanks for the recommendation!

[–] silasmariner@programming.dev 4 points 1 day ago

Very pleased to have been of help! I love scala but Java really isn't too bad (streams API is fine except that you need to explicitly move in and out, rather than getting to do the cool scala thing of just using methods in the phenomenal collections library) and I don't like dunking on it, but it really does need a few helper libs. Tuples, either and try I think vavr has. Java seems to have covered most other stuff now. But been a half decade since I've written more than 10 lines at a time so hasn't come up for a while. Sorry. Reminiscing. Sunday night blues.

[–] arendjr@programming.dev 2 points 1 day ago

I’m gonna wait for backup on this one.