re: What’s an unpopular software opinion you have? VIEW POST

FULL DISCUSSION
 

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.

 

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.

 

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.

 
 

Hell yeah! I'm with you, nothing like a set of ternary operators when you're iterating through an bunch of variables. They also make intutive sense to me, even more so than IF/ELSE even - I see the symbols and I think

"this thing happened, yea ? ok, do this : no - ok, do this"

code of conduct - report abuse