Re:Three Months of Go, from a Haskeller’s perspective (2016)
by matwood on Sunday March 19, 2017 @09:09AM
(#13906836)
I'm just getting into Go and have found what you said to be true. It's easy to read other people's code on GH (Java is much the same way). Compare that to something like Scala, where no ones code looks the same.
Re:Three Months of Go, from a Haskeller’s perspective (2016)
by Elrac on Sunday March 19, 2017 @11:47AM
(#13907784)
I'd like to echo what you said. I tend to be a victim of analysis paralysis, spending hours thinking up the most clever design. Go offers far fewer alternatives so there goes the temptation. Given a smallish task, I simply sit down and grind out code, and a couple of thousand lines later I have a simple, self-contained executable that does what I wanted to do. I feel there's a kind of magic in Go's brute simplicity.
Re:Three Months of Go, from a Haskeller’s perspective (2016)
by cube2222 on Sunday March 19, 2017 @09:21AM
(#13906874)
Check out sourcegraph, it's great for reading Go and Java code and has a GitHub integration.
Re:Three Months of Go, from a Haskeller’s perspective (2016)
by kasey_junk on Sunday March 19, 2017 @09:34AM
(#13906951)
Honestly the biggest thing go has going for it is gofmt. Its one of the few things I miss when I work with other languages.
Re:Three Months of Go, from a Haskeller’s perspective (2016)
by efdee on Sunday March 19, 2017 @12:52PM
(#13908176)
Doesn't every semi-decent IDE have an option to reformat your code? What makes gofmt so special?
Re:Three Months of Go, from a Haskeller’s perspective (2016)
by cube2222 on Sunday March 19, 2017 @02:14PM
(#13908710)
That all code is written the same from the get-go, and you can readily browse it in places like github, etc.
Re:Three Months of Go, from a Haskeller’s perspective (2016)
by kasey_junk on Sunday March 19, 2017 @08:07PM
(#13910664)
No external choices the language dictates style. It ships with the sdk & contributors are expected to use it so there is a cultural agreement out of the box. It's a cli tool so it's immensely scriptable and easy to integrate.
I meant smaller parts of code, and not for loops actually. (I prefer maps, filters etc.). Things like gofmt and the simplicity (in that, small number of concepts) of the language lead to most people writing fairly idiomatic code. This way most codebases look the same and you read each other's code as it were yours.