Live data from Hacker News

Why I Don't Like Golang (2016)

teamten.com

71–80 of 297 posts

Re: Why I Don't Like Golang (2016)

#71
post #64

Earlier quoted context omitted.

I also prefer writing REST APIs in Go. - Compared to Java: Ecosystem is way over-engineered. You might get along just fine without writing a bunch of boilerplate and factories and XML configs, but sooner or later you're probably going to pull in some dependency that does and have to deal with a bunch of clunky APIs and other annoyances. - Python: Possibly the only language that's even worse at dependency management t…

I see this complaint against Java a lot. If you're going to slum it in a language with no ecosystem so you don't feel overwhelmed, why not just use less of the Java ecosystem?

I think that when GP said, "ecosystem is over-engineered", they didn't mean that it's too rich, they meant to say that it's over-engineered.

Which, I'm not sure there's a more durable reputation in all of informatics than Java's reputation for over-engineering things.

There are cleaner Java libraries for most things nowadays, but the culture around the language is also such that, in many companies, it is politically much easier to use another language entirely than it is to use Java but choose a REST framework that doesn't implement JAX-RS.

Re: Why I Don't Like Golang (2016)

#72
Biggest issues for me here were generics & the dependency situation, both of which are being fixed. But even back then, I loved using Go, mostly for what it DIDN'T have. Even ternaries, while convenient, inevitably lead to someone using them to write some really stupid shit that's hard to read.

Overall, I'm a fan of losing a few helpful abstractions in order to get rid of all the bad ones, whether in the language itself or in it's ecosystem. And Go delivers on that.

Re: Why I Don't Like Golang (2016)

#73
post #65

Earlier quoted context omitted.

WRT renaming, I find that refactoring code is often such an oversight from language designers. I consider C# to be an elegant language in this way. Public fields and properties look the same in C# so you can effortlessly refactor between them, for example. I wish more languages thought about this stuff.

I liked a similar aspect of Ruby: attributes and 0-args methods had the same syntax, so you could easily refactor a static field into a method that returns a dynamically calculated value. Overall I don't like that feature, but that was a very handy aspect of it.

Ruby actually went one step beyond: there are no attributes. `attr_reader` just generates a 0-arg method, while `attr_writer` just generates a 1 argument `name=` method.

Re: Why I Don't Like Golang (2016)

#74
post #62
post #57

Earlier quoted context omitted.

I can comment on this on my own: 1. Java - did not want to adopt the entire ecosystem. This is very much wanted a banana and got the whole jungle with a gorilla type of story. 2. Python - dynamic. Don't want that. Go's minimal typing is perfect. It's easy to deploy (binaries). It's fast. It can scale well. It's opinionated (love this). Python and Java both encourage and allow developers to flex creative solutions tha…

You can write small Java services. You really don't need Spring or anything. You should try it some time.

I think Java is ok. I just don't like all the weight you inherit with the ecosystem. There's a lot of buttons you have to learn and history. It's working a submarine vs purposed craft (bad example).

Re: Why I Don't Like Golang (2016)

#75

Does anyone remember reading K&R for the first time? To me seemed like C was such a tight, perfect little design. Only thirty keywords, and simple consistent semantics.¹ When I first learned it, it was still pre ANSI, and you declared a function like this int f(a) char *a { } The ANSI style function declaration was maybe the only innovation that came after that that significantly improved the language. I remember in…

I just started digging into C a few years ago and was struck by the same. It's amazingly simple and the only "flaw" that leaps out at me is the precedence of & and | being higher than comparison operators. Other than that, and maybe the macro system, everything frustrating about learning it was due to the frustration of dealing with the machine rather than anything C itself imposed on me.

C can be quite complex once you get into all the abstractions it's using. And even for newbies I think the whole syntax around pointers is unnecessarily confusing (or at least people are often confused by it in a way they usually aren't when learning assembly). Not to mention how many keywords and symbols are overloaded and depend on their context for meaning.

Re: Why I Don't Like Golang (2016)

#76
post #64

Earlier quoted context omitted.

I see this complaint against Java a lot. If you're going to slum it in a language with no ecosystem so you don't feel overwhelmed, why not just use less of the Java ecosystem?

I think that when GP said, "ecosystem is over-engineered", they didn't mean that it's too rich, they meant to say that it's over-engineered. Which, I'm not sure there's a more durable reputation in all of informatics than Java's reputation for over-engineering things. There are cleaner Java libraries for most things nowadays, but the culture around the language is also such that, in many companies, it is politically…

>politically much easier to use another language entirely than it is to use Java but choose a REST framework that doesn't implement JAX-RS

This might be true but I find it so backwards.

Re: Why I Don't Like Golang (2016)

#77
post #63

Does anyone remember reading K&R for the first time? To me seemed like C was such a tight, perfect little design. Only thirty keywords, and simple consistent semantics.¹ When I first learned it, it was still pre ANSI, and you declared a function like this int f(a) char *a { } The ANSI style function declaration was maybe the only innovation that came after that that significantly improved the language. I remember in…

Same here. K&R C is probably still my favorite programming book. I will admit that most of the examples I had to stop and think about, they all seemed 'cleverly' written. But in each case, it gave me pause, and taught me a new, often simpler way.

The 'K' in K&R actually wrote a book on Go, "The Go Programming Language". I haven't used it personally but it has good reviews, so it might be a good resource for people who are curious about Go and know they like that writing style.

Re: Why I Don't Like Golang (2016)

#78
I totally get all of these points and understand them, and they're really why I do like Go. Implicit interfaces, for example, means you don't need to change code for something to implement this interface. It's a powerful thing that I find really great, especially coming from years of Java having to update everything I want to implement the new interface. If I don't have access to the code, then it's more boilerplate to do that. With Go, I create the interface I want and anything that implements it immediately works.

I understand why people might dislike a particular language and that's cool. That's why there are many languages and we have the ability to choice what works best for us.

Re: Why I Don't Like Golang (2016)

#79
I have been using Go in production since 2012 and I find it a fantastic tool. Except for point 8 ("The sort.Interface approach is clumsy") the rest are features for me.

I am so grateful for the Go creators for having made it as it is. What worries me is the recent changes: modules (never had a problem with GOPATH) and Go 2 proposals. I hope they are able to keep their vision as it started.

Re: Why I Don't Like Golang (2016)

#80

Earlier quoted context omitted.

If you're just writing a REST API, I wonder, why did you choose Go for this instead of Java or Python?

I also prefer writing REST APIs in Go. - Compared to Java: Ecosystem is way over-engineered. You might get along just fine without writing a bunch of boilerplate and factories and XML configs, but sooner or later you're probably going to pull in some dependency that does and have to deal with a bunch of clunky APIs and other annoyances. - Python: Possibly the only language that's even worse at dependency management t…

On Python packages, we’ve found miniconda + pip is great for isolated environments that JustWork.
Post reply on HN