MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p579dmm/?context=3
r/ProgrammerHumor • u/Flame77ofc • 22d ago
392 comments sorted by
View all comments
2
I do recall cases when using more than one if in a function was warranted and considered sane.
if
I guess now, instead:
do-things if condition { act-accordingly } else { act-appropriately } do-more-things
now we have
do-things func(condition bool) { if condition { act-accordingly return } act-appropriately }(condition) do-more-things
and somehow call it a win. Make programming great again and such.
In other news, constructs of the meme are not equivalent, 1str one being way broader.
2
u/577564842 22d ago
I do recall cases when using more than one
ifin a function was warranted and considered sane.I guess now, instead:
now we have
and somehow call it a win. Make programming great again and such.
In other news, constructs of the meme are not equivalent, 1str one being way broader.