4 ms·
Not only that, on LOC is the goal; the Go code isn't written in most terse form, there are numerous unnecessary newlines and they do things like: Examples:
by voidlogic 11y ago
Not only that, on LOC is the goal; the Go code isn't written in most terse form, there are numerous unnecessary newlines and they do things like:
Examples:
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
vs
cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr
and:
if open == 0 {
fmt.Println("ok")
} else {
fmt.Println("not ok")
}
vs.
if open == 0 {
fmt.Println("ok")
return
}
fmt.Println("not ok")
- jbooth 11y agoYour first example is a great counter-point to the talk above about "if more stuff can fit on the screen it's easier to understand". I personally really prefer the 2-line construction.