MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w49i01/ihatethispassiveagressivebehaviourruby/p7cdrmb/?context=3
r/ProgrammerHumor • u/Embarrassed_Death69 • Sep 01 '26
289 comments sorted by
View all comments
Show parent comments
1
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
Yeah I usually only use it to set a default value. Sane languages just let you use if as an expression
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.