In the following program:
package main
import "fmt"
func main() {
a := 3
b := 7
a = +b
a += +b
fmt.Println("a", a, "b", b)
}
I believe the +b is extraneous and does not modify command operation, in both cases. Could go fmt simplify this by removing the plus operator? Similarly we remove things like braces and semicolons when they are unnecessary and do not affect program operation.
Running go tip.
In the following program:
I believe the
+bis extraneous and does not modify command operation, in both cases. Couldgo fmtsimplify this by removing the plus operator? Similarly we remove things like braces and semicolons when they are unnecessary and do not affect program operation.Running
gotip.