in reply to Format / Logical Expression / Style Opinions: my, ternary, subroutine, @_
A better question than "Is it readable enough?" is: "Is it as comprehensible as it can be?". BrowserUK's reply answers the comprehension question very well with a resounding "No!" for the nested ternary in this case.
Although I'm somewhat partial to using the ternary operator, in most places an if is more readable. Almost always there are better alternatives to nested ternary operators. A little thinking outside the box (in this case "init from args first") can pay huge dividends.
|
|---|