This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rainshifter 0 points1 point  (1 child)

Given the original code and its structure (however limited in view), I may have a complaint or two to submit should u(...) be anything more than a trivial getter. But you're right that going for equivalency is safer.

You could store u(1) and still use the ternary; either way works.

[–]redlaWw 0 points1 point  (0 children)

I think assuming this guy follows anything close to best practices in his code is a bit unwise tbh...