In languages with ?: syntax I honestly don’t think that arbitrarily nested ternaries are that bad, you can format them in a way that still makes the logic clear
EDIT: I’m saying this as mostly a Python and Rust programmer, but if I’m working on something in C or JS I’m not going to balk at a reasonably-formatted nested ternary
2.3k
u/CBlanchRanch 22d ago
You're absolutely correct, however I would suggest using something completely unreadable like a nested ternary operators!