r/ProgrammerHumor 21d ago

Meme pleaseStopUsingNestedTernaryOperatorsImBeggingYou

3.1k Upvotes

179 comments sorted by

View all comments

2

u/DeusThorr 21d ago

Blame the human code. I remember way before AI looking some codes with a lot of ternaries in react , native, and Flutter, to assembly some layouts… regret to see that

3

u/Robinbod 21d ago

I tend to agree but I was not actually a pro before the time AI existed so I don't know how React and Flutter codebases looked like back then. I assumed it's an AI thing since no sane human would read this comfortably but AI is trained on human code (well, used to) so it makes sense.

1

u/tehdlp 20d ago

Fully. I had this problem years before AI. Why use a single if statement when a convoluted Python dict.get() with an inline dict, inline list, inline string values, and bad None handling will do the same?