4 ms·
You think it’s “a lot of work” to write an if statement? Any of the proposed variations have shown to be either different syntax (weak valueless change) or woul
by righthand 3y ago
You think it’s “a lot of work” to write an if statement? Any of the proposed variations have shown to be either different syntax (weak valueless change) or would allow people to ignore handling errors.
You can’t always return nil? is that a complaint that you are required to do things differently for data types that require it inside of a complaint about doing things the same?
It’s not a weird take, things have tradeoffs, this is a tradeoff of using Go.
- unscaled 3y agoIt's not a lot of work, you can just let the IDE spew it off for you and feel like a certified J2EE programmer circa 2003 who lets the IDE write everything for them. But yeah, writing code is not the problem. Reading the code is. I think having 60% of your lines of code being: if err != nil { return err } Does make the code a tad bit less readable.
- righthand 3y agoSo then it’s less readable because you have to process a simple error return? I won’t even comment on the 60% of code is error handling, that sounds like code that needs refactoring.