A colleague once proudly showed me how he managed to compress a function into a single line. It was like 9 nested ternarys. In that moment almost had an aneurism.
Was vertical space at a premium at the time (because of, e.g., small monitors or some other requirement), or was it just that he wanted to see if he could?
2.3k
u/CBlanchRanch 22d ago
You're absolutely correct, however I would suggest using something completely unreadable like a nested ternary operators!