Hacker News new | ask | show | jobs
by ludicast 3436 days ago
Agreed, plus obviously your "if" statement doesn't do the assignment to usefulMetric. One more way the ternary wins (along with functional languages that use "if"s as expressions).
2 comments

a "final" declaration (in Java) would have pointed that out through a compilation error ;)
D'oh! Fixed. Thanks. :)