|
|
|
|
|
by masklinn
1975 days ago
|
|
> And having the power to ignore the convention is good, too. Mistakenly not handling errors is not "the power to ignore the convention", it's "the language is half assed". "The power to ignore conventions" is being allowed but having to explicitly ignore the error, aka that the second and third cases trigger errors, and that you'd have to write: y, _ := fmt.Println("Bar")
println(y) _, _ = fmt.Println("Qux") (also note how you can not use `:=` in the second case, because that requires that there be at least one new variable on the LHS) |
|
There is a plethora of tools available to allow you to detect if you did that when you didn't mean to. It's just that the compiler doesn't enforce it.