News for hackers. Stuff that matters.
Re:My Go Resolutions for 2017 by lmb on Thursday January 19, 2017 @08:53AM (#13435721)
In most cases this will boil down to:

    n := defaultVal
    if expr {
      n := otherVal
    }
Which I think is easier to understand, and not that much more typing. YMMV of course.
Re:My Go Resolutions for 2017 by gkya on Thursday January 19, 2017 @10:38AM (#13436570)
If defaultVal is a constant, this is OK, but what if it requires computation?