DEV Community

Discussion on: Why I'm phasing out ternary statements

Collapse
 
mcgurkadam profile image
Adam McGurk

I definitely agree that we need to avoid ternaries in ternaries (I've seen that in wild....just why????) and also logic in ternaries...

And I agree that the time to use them is when we're assigning value...and only then. And there is definitely a time and a place for them!

Thanks for reading!!!

Collapse
 
riccardomessineo profile image
Riccardo Messineo

Thank you for sharing!

I really appreciate that readability is becoming more important than having a fewer lines of code, as you suggested.

We need to understand that we are mainly readers of code, and only then writers.

Thread Thread
 
mcgurkadam profile image
Adam McGurk

Totally agree!!! We are definitely readers first, creators second, writers third.