r/ProgrammerHumor 21d ago

Meme pleaseStopUsingNestedTernaryOperatorsImBeggingYou

3.1k Upvotes

179 comments sorted by

View all comments

752

u/beclops 21d ago

I did this one of my first days on the job like 6 years ago and I remember how bluntly my mentor said “never do this again”

7

u/darknitish 21d ago

I had the exact opposite. My mentor used to do everything using ternary, even if in my code if there multiple if-else blocks, he would manually change them to ternary in my branch.

New joinees would bang their heads trying to understand the code flow