News for hackers. Stuff that matters.
Re:Adam Langley's Pond: Secure Async Messaging by packetslave on Saturday July 13, 2013 @11:09PM (#6039769)
From the Go language spec:

"For signed integers, the operations +, -, *, and << may legally overflow and the resulting value exists and is deterministically defined by the signed integer representation, the operation, and its operands. No exception is raised as a result of overflow. A compiler may not optimize code under the assumption that overflow does not occur. For instance, it may not assume that x < x + 1 is always true."

  func main() {
    var foo int8 = 127
    fmt.Println(foo + 1)
  }
prints -128
Re:Adam Langley's Pond: Secure Async Messaging by agwa on Saturday July 13, 2013 @11:15PM (#6039792)
Cool, thanks for the info!

Looking at the spec, I see that signed integers are elsewhere defined to be represented using 2's complement, so this is completely kosher.