News for hackers. Stuff that matters.
Re:Programming Patterns I Like by masswerk on Friday June 28, 2019 @11:43PM (#20310694)
Regarding nested ternaries, while not recommended, short circuit evaluations may be even more readable:

return ( (cA && cB && "A & B") || (cA && "A") || (cB && "B") || "neither" );

Re:Programming Patterns I Like by foota on Saturday June 29, 2019 @03:45AM (#20311339)
Quick, it's another case of Javsacript Stockholm Syndrome!
Re:Programming Patterns I Like by masswerk on Sunday June 30, 2019 @03:55PM (#20320145)
:-)

However, this would also work in Perl, etc, (anything featuring short-circuit evaluation and type coercion for evaluating conditions.)