Kudos to the ternary operator! I greatly appreciate your compactness from time to time! And don’t let those bullies tell you you’re hard to read. You are fine just the way you are. W?t:f.
Don't mind ternary operators for simple cases but once someone starts putting multiple function calls in each part of the operator, it makes it difficult to debug.
Kudos to the ternary operator! I greatly appreciate your compactness from time to time! And don’t let those bullies tell you you’re hard to read. You are fine just the way you are. W?t:f.
The main argument against it seems to be "junior devs won't understand it". I think the answer to that is that they should learn the language.
Yeah sometimes a deep dive into the language will clear up most problems you have as a Jr.
Key phrase: time-to-time
Don't mind ternary operators for simple cases but once someone starts putting multiple function calls in each part of the operator, it makes it difficult to debug.
Very much this. If you have more than one ternary operation in a statement, you need to not use any.
lol