News for hackers. Stuff that matters.
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).
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 ;)
Re:Making the move from Scala to Go by kbenson on Tuesday January 24, 2017 @10:20PM (#13478172)
D'oh! Fixed. Thanks. :)