Re:Making the move from Scala to Go
by ludicast on Tuesday January 24, 2017 @10:16PM
(#13478152)
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).
[ Parent
| on HN ]
Re:Making the move from Scala to Go
by LgWoodenBadger on Tuesday January 24, 2017 @10:57PM
(#13478354)
a "final" declaration (in Java) would have pointed that out through a compilation error ;)