4 comments

[ 885 ms ] story [ 1607 ms ] thread
I've been using Go as my primary language at work for over a year.

I was very happy to see "Toward Go 1.3"[0] on the frontpage earlier today, because I learned a lot of stuff about the upcoming release that I didn't know. I was hoping to see some discussion about my two favorite new features: a C-to-Go translator, and a 100% precise garbage collector.

But then I cringed upon seeing that the top comment was yet another completely off-topic remark about generics.

It might be one thing if the article posted is about how to make general-purpose data structures in Go, or something else for which the issue of generics is somehow relevant, but bringing up generics in literally every discussion about Go lends about as much value as mentioning whitespace in every post about Python[1].

At the end of the day, I very rarely hear regular Go programmers complain about the lack of generics. It's not unheard of, but I don't think it's in the top five (or even ten) complaints of people who write Go on a daily basis. If it were, they'd have been done already.

</rant>

Getting at the rest of the linked post:

Go is deceptive. It syntax is familiar to anybody who has ever used any C-style programming language. It is easy to pick up. But writing idiomatic Go code (and designing idiomatic Go programs) is not as easy as being able to read the code and understand what it does.

In this way, Go is no different from most other languages - the difference is that when most newcomers look at (e.g.) Erlang or Scala, the syntax and code structure jump out at them as being different, and mentally, that prepares them for the notion that they should design their programs differently.

Go is deceptively familiar, which may be why newcomers often try to write $FAVORITE_LANGUAGE in Go ("it looks familiar, so why can't I write my code the same way?").

[0] https://news.ycombinator.com/item?id=7218349

[1] Even less value, because the Go language developers have stated ad nauseum that they are interested implementing generics (https://news.ycombinator.com/item?id=7220979), whereas Guido will never implement braces.

(comment deleted)
I'm not going to comment on the article (which has some valid points) - What I did immediately notice is that Rob didn't really consider the implied meaning people usually ascribe to that idiom. So ...

- His actress friend really meant - "I don't think I'd be happy as anything other than an actress".

- His programmer friend really meant - "Generics have made a meaningful difference in my productivity and general work happiness".

While I'm making up assumed paraphrases for people I don't know (which feels disingenuous), is it really any worse than taking this phrase literally?

I can't imagine Rob meant it!

> I resolve to recognize that a complaint reveals more about the complainer than the complained-about

That's pretty patronizing. It seems obvious that the programmer meant "I can't imagine programming in a language without generics again."