How does this behaviour sense? wouln't it make mor sense to just print an compiler warning instead of an error?
func main() {
var y float64 = 0.0
var x float64 = 4.0 / y
fmt.Println(x)
}
+Inf
func main() {
var x float64 = 4.0 / 0.0
fmt.Println(x)
}
prog.go:9:22: division by zero