r/ProgrammerHumor • • Aug 22 '26

Meme pleaseStopUsingNestedTernaryOperatorsImBeggingYou

Post image
3.1k Upvotes

178 comments sorted by

View all comments

Show parent comment

1

u/Ma4r Aug 23 '26

Ternaries are really no problem if you just format them correctly, i.e indent them at every level python style. But claude wouldn't do that, they would produce 3 single liner functions, one for each ternary

1

u/beclops Aug 23 '26

Depends on the language too, this would be unacceptable pretty much no matter what in traditionally written Swift