News for hackers. Stuff that matters.
Re:Introduction to Go 1.1 by jsmeaton on Tuesday March 26, 2013 @07:25AM (#5442460)
I'm not familiar with Go, but I'd imagine something like this:

  const int SomeNumber = 0;
  // then much later in the program
  return 3 / SomeNumber;
An accidental and not immediately obvious divide by constant 0.
Re:Introduction to Go 1.1 by JulianMorrison on Tuesday March 26, 2013 @07:48AM (#5442546)

  const weasels = 5    
  const lawyers = 5    
  const mustelids = weasels - lawyers

  feedWeaselsEach(chickenPortions / mustelids)
Re:Introduction to Go 1.1 by netcraft on Tuesday March 26, 2013 @10:45AM (#5443600)
would this count as a constant 0 and be caught by the compiler?
Re:Introduction to Go 1.1 by JulianMorrison on Tuesday March 26, 2013 @10:48AM (#5443627)
Yup. Constants are computed at compile time in Go.