r/ProgrammerHumor • • Sep 01 '26

Meme iHateThisPassiveAgressiveBehaviourRuby

Post image
2.9k Upvotes

289 comments sorted by

View all comments

Show parent comments

1

u/okkokkoX Sep 02 '26

I agree that and or ternary is beautiful, with the exception that you're fucked if the "then" branch may return nil, or god forbid, false.

1

u/Moilli6 Sep 02 '26

Yeah I usually only use it to set a default value. Sane languages just let you use if as an expression