Intention action: ternary expression with constant

Hi JB,

could we please have an intention for replacing an expression like


(and similar ones for the other cases where one or the other
branch of a ternary expression is one or the other boolean

Thanks in advance,

Comment actions Permalink

Sounds like an IPP thing -- I don't see many reasons for something like this to be on the core.

Using a logical operator instead of the ternary doesn't provide any performance benefits, nor improves reading -- all in all, I'd say this is just a stylistic preference. Feel free to write a plugin yourself, shouldn't be hard to do.

Comment actions Permalink

Please post a request to JIRA. I can't say it'll get a very high priority, but if it's not in JIRA I will lose it.

--Dave Griffith

Comment actions Permalink

I had the same idea just a few days ago, so I second this request.


Please sign in to leave a comment.