News for hackers. Stuff that matters.
Re:Leaving Go by maxk42 on Monday April 28, 2014 @03:28PM (#7662310)
This doesn't work, but if it did you could simplify the switch statement to:

    switch v:= x.(type) {
    case int32, int64, float32, float64:
        if v < 0 {
            return -v
        }
    }
Go has some neat improvements to the switch statement: http://golang.org/doc/effective_go.html#switch

There are no comments on this comment yet.