I've found that telling agents to not do something mostly just gives them a suggestion of a way to do that thing, and the part about not doing it that way gets lost. Well, it's nicely accessible for when it apologizes for doing it.
I now try to only give examples of how I want it to do things, and hooks that complain when they do the bad thing (but still don't mention the bad thing in the complaint.)
I would actually prefer chained ternaries over more verbose if/else expressions with duplicated LHS, so this does go back to the argument about "taste".
1. Not having two sets of syntax for the same idea, especially when if statements can trivially be extended to an expression.
2. Not adding the concept of an operator pair (? and :) to the grammar of the language, along with parsing rules, just for this one case
3. Not getting the precedence of this ?: operator pair completely wrong.
4. The conditions are at the same indentation level, each condition is preceded by the word "if" - it's obvious what it is when skimming the code.
5. The values too are at the same indentation level, making it obvious they play the same role in the code - rather than your snippet where the condition "baz" is directly under the value 1
I now try to only give examples of how I want it to do things, and hooks that complain when they do the bad thing (but still don't mention the bad thing in the complaint.)