News for hackers. Stuff that matters.
Re:Declined Proposal: A built-in Go error check function, “try” by nkozyra on Tuesday July 16, 2019 @08:54PM (#20455446)
> My guess is that gofmt is a huge factor in this

It really is. My code looks like your code and the next person's code. Go is opinionated and strict and that makes reading other people's code so much easier

Re:Declined Proposal: A built-in Go error check function, “try” by erik_seaberg on Wednesday July 17, 2019 @12:08AM (#20456360)
Experts' code should be clearer and more concise than novices' code. If that's not true, there's no payoff for getting more proficient with the language, and it's not doing enough to help you.
Re:Declined Proposal: A built-in Go error check function, “try” by oftenwrong on Wednesday July 17, 2019 @06:50AM (#20458120)
golang is not primarily designed for experts

"The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt." – Rob Pike

Re:Declined Proposal: A built-in Go error check function, “try” by pjmlp on Thursday July 18, 2019 @05:07AM (#20468050)
Ironic in a company that prouds itself of PhD hiring games.
Re:Declined Proposal: A built-in Go error check function, “try” by nkozyra on Wednesday July 17, 2019 @12:15AM (#20456401)
This is about readability. There are many other attributes of code (idiomatic? design? efficiency?) that differentiate. But I should be able to grok anyone's code within reason.
Re:Declined Proposal: A built-in Go error check function, “try” by thatswrong0 on Tuesday July 16, 2019 @09:25PM (#20455584)
I wish gofmt would let you set a desired line length and break it for you.. prettier has me spoiled in that regard
Re:Declined Proposal: A built-in Go error check function, “try” by mcbits on Tuesday July 16, 2019 @09:39PM (#20455655)
If a tool is going to enforce line length limits, I'd rather have it spit a warning/error than silently try to guess a good place to break the line automatically. Otherwise, an editor tool that soft-wraps long lines at the (often poorly) guessed location without touching the code would be better.
Re:Declined Proposal: A built-in Go error check function, “try” by thatswrong0 on Wednesday July 17, 2019 @12:52AM (#20456567)
But that’s the thing about prettier - it wraps exceptionally well because it actually parses the AST. I never think about how I space my JavaScript anymore because it always does it correctly.. it’s one less thing to get in my way when I code
Re:Declined Proposal: A built-in Go error check function, “try” by mcbits on Wednesday July 17, 2019 @03:18AM (#20457242)
The number of options that prettier exposes (despite boasting about being "opinionated", i.e. disregarding the user's opinions) suggests that there are people with different aesthetics or accessibility needs who would not consider one style to be always correct.

IMHO we're about 10 years overdue for committing a canonical representation of that AST to version control instead of treating a particular serialized visualization of it as the single source of truth (and spending countless hours debating which format is "good enough" for everyone in every situation).

Re:Declined Proposal: A built-in Go error check function, “try” by hacknat on Tuesday July 16, 2019 @10:59PM (#20456031)
You can always set your defaults for your editor.