4 ms·
Oh, that it doesn't. I meant smaller parts of code, and not for loops actually. (I prefer maps, filters etc.). Things like gofmt and the simplicity (in that, s
by cube2222 10y ago
Oh, that it doesn't.
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.
- matwood 10y agoI'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.
- cube2222 10y agoCheck out sourcegraph, it's great for reading Go and Java code and has a GitHub integration.
- Elrac 10y agoI'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.
- kasey_junk 10y agoHonestly the biggest thing go has going for it is gofmt. Its one of the few things I miss when I work with other languages.
- cube2222 10y agoI think it may actually be the thing I miss the most. (together with implicit interfaces)
- efdee 10y agoDoesn't every semi-decent IDE have an option to reformat your code? What makes gofmt so special?
- cube2222 10y agoThat all code is written the same from the get-go, and you can readily browse it in places like github, etc.
- kasey_junk 10y agoNo 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.