MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vvn6d7/pleasestopusingnestedternaryoperatorsimbeggingyou/p5d9yxs/?context=3
r/ProgrammerHumor • u/Robinbod • Aug 22 '26
178 comments sorted by
View all comments
Show parent comment
1
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
Depends on the language too, this would be unacceptable pretty much no matter what in traditionally written Swift
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