News for hackers. Stuff that matters.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @07:36AM (#13906500)
Go has a lot of advantages.

Yes, you are a little bit limmited sometimes because of the lack of generics and the like, but at the same time, if you learn to use Go interfaces well, you end up using them most of the time happily. The parallelism primitives are great too.

As much as I love complex type systems, pattern matching, algebraic data types etc., I know that if Go had those things, it wouldn't be the language I love to write everyday anymore.

Somehow, Go is a really practical language and you end up being very productive in it, at least from my experience.

Saying that people who write Go should be stupid is shallow thinking. Complex languages aren't the only complexity that you should have. Some people concentrate on sophisticated architectural design (like Kubernetes).

There is one thing in Go, that I haven't met anywhere else. I can really understand any codebase I stumble upon in a matter of seconds. This is a huge boon to productivity.

Anyways, I never had any problems switching between Go and languages like F# or Scala on a daily basis. Rust looks interesting, though I think it will end up being too complex for a lot of people to understand, which will hinder its growth.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by pka on Sunday March 19, 2017 @08:11AM (#13906632)
> There is one thing in Go, that I haven't met anywhere else. I can really understand any codebase I stumble upon in a matter of seconds.

Care to elaborate a bit more?

I understand that when you see for(...) { b[i] = f(a[i]); } then you instinctively know that it's a loop that maps over some sequence, and so on. But let's say you have a 50-100kloc codebase with a 100 files in it. In what unique to Go way does Go help you understand the big picture/coarse architecture of such a project?

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @08:52AM (#13906774)
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.

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.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @09:46AM (#13907030)
I think it may actually be the thing I miss the most. (together with implicit interfaces)
Re:Three Months of Go, from a Haskeller’s perspective (2016) by AlphaSite on Sunday March 19, 2017 @09:56AM (#13907086)
My biggest problem with it is implicit interface.

I genuinely despise that about it.

Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @10:35AM (#13907295)
Why don't you like implicit interfaces, it's the feature I love the most actually?
Re:Three Months of Go, from a Haskeller’s perspective (2016) by tonyedgecombe on Sunday March 19, 2017 @02:15PM (#13908714)
I like it as well although I can see there would be times when you might want to be explicit.
Re:Three Months of Go, from a Haskeller’s perspective (2016) by cube2222 on Sunday March 19, 2017 @03:02PM (#13908960)
I understand, but why would it be the greatest issue to despise, I'm just curious.