Re: [PATCH] coding-style: Allow some use of ternary operators

2022-07-25 Thread Daniel P . Berrangé
On Mon, Jul 25, 2022 at 03:13:58PM +0200, Michal Privoznik wrote: > While we all understand that excessive use of ternary operator > may worsen code readability (e.g. nested, multi-line expression), > there are few cases where using it actually improves code > readability. For instance, when a func

Re: [PATCH] coding-style: Allow some use of ternary operators

2022-07-25 Thread Claudio Fontana
A common sense improvement. Reviewed-by: Claudio Fontana On 7/25/22 15:13, Michal Privoznik wrote: > While we all understand that excessive use of ternary operator > may worsen code readability (e.g. nested, multi-line expression), > there are few cases where using it actually improves code > re

[PATCH] coding-style: Allow some use of ternary operators

2022-07-25 Thread Michal Privoznik
While we all understand that excessive use of ternary operator may worsen code readability (e.g. nested, multi-line expression), there are few cases where using it actually improves code readability. For instance, when a function takes a long list of arguments out of which one depends on a boolean