Re:Yoda conditions
by ur-whale on Thursday August 15, 2019 @02:15PM
(#20708027)
A useful aspect of yoda notation is that it often makes an equality test easier to read because the constant is shorter than the expression it is tested against, and the == sign comes right away, not buried far away in the line.
It's my favourite way of writing if statements.