DEV Community

Discussion on: 5 Programming Patterns I Like

Collapse
 
verrigo profile image
Radu Caprescu

I'm sorry, but if you like nested ternaries you are either a bad man or someone who didn't have a 4 or 5 nested ternary that made you scream with pain. Or both :D

Collapse
 
thejohnstew profile image
John Stewart

😅

I haven't done 4 or 5 nested. That seems a bit much lol

Collapse
 
verrigo profile image
Radu Caprescu

Well, I have PTSD with using ternaries. I once did some work in Jasper Reports and their scripting language used only ternaries. Now every ternary that is longer than 1 line (max 2 at the most) gives me the creeps and is an instant code smell for me