Personally, I've never really minded the bloat created by the use of the if err != nil { ... }
. I've always liked the ability to see right there on the next line exactly what happens in the event of an error.
However, I do understand the eye strain created by many of these popping up in quick succession, particuarlly when calling many helper functions (e.g. anything to do with handling and processing files). In the event that this moves to a full proposal, I would absolutely support the need to continue to allow for the more verbose if err != nil { ... }
option, but I wouldn't mind seeing the check
/handle
desgin be implemented.
One suggestion I would have is to create a bit more clarity at the cost of introducing a few additional characters. I don't really like the idea of when check
is triggered it rolls back up through the handle
statements - it seems like something that could get confusing when scrolling through longer files.
Maybe something like this could be an option:
func CopyFile