Live data from Hacker News

Why Go gets criticized so much

npf.io

111–120 of 251 posts

Re: Why Go gets criticized so much

#111

The main problem with Go, and this is a deal breaker for me, is that it forces opening curly braces onto the same line, instead of putting them on a line by themselves. This is clearly wrong, and flies in the face of curly good taste.

If it's clearly wrong, can you articulate a reason? There is at least one (mild) argument in favor of opening a curly brace on the same line: code takes up less vertical space, allowing a programmer to view more of their program on a given screen at once.

Re: Why Go gets criticized so much

#112
post #90
post #73

Earlier quoted context omitted.

"The lack of exceptions makes writing correct code really tedious." Tedious up front often translates into time saved down the road. Exceptions are often an easy way out while accruing future debt. Unfortunately, our industry cannot easily measure the time saved down the road and so cannot properly value it. However, many with long term interests in a project will often spend on the "tedious" costs up front to avoid…

> Exceptions are often an easy way out while accruing future debt. Is there perhaps a concrete illustration on how using exceptions causes technical debt, especially in a GCed language like Go?

The advantage with go is that errors have to be handled right away by the thing that may have caused it. The is versus, say a try/except with a dozen lines of code in the try, and then something like `except KeyError: pass`. You may have no idea which line caused the error or why it did so.

Re: Why Go gets criticized so much

#113
post #62

Earlier quoted context omitted.

You'll love goimports then. https://godoc.org/golang.org/x/tools/cmd/goimports Hook it to your editor's save command and never worry about imports again. On the other hand, stop leaving unused variables around...

I hate debugging someone else's code that has unused variables in it as much as this guy seems to hate the go compiler.

Any normal compiler usually allows overriding these options. I normally write Haskell and it has it all: unused variables, unused imports, name shadowing, non-exhaustive pattern matching, everything. But these things are warnings in my dev build and errors in the release build. That's a sane way to do it.

Re: Why Go gets criticized so much

#114

I would burn Go with fire and salt the earth because it's the bloody compiler will refuse to compile my valid code if I have unused imports or variables. It makes programming in Go a terrible experience and that's why I won't touch it.

I think that behavior is annoying, too. I've wonder if there's a way to tell the compiler to generate a warning for unused variables instead of just erroring out.

No there isn't. Because Go loves to show you the middle finger.

Re: Why Go gets criticized so much

#115
post #18

People who dislike X are upset because they incorporated their favourite Y into their identity, and the success of X challenges their own choices. True for football teams, political parties, games consoles, superhero franchises, religions, food choices, colour schemes, preferred spelling variants, ...

Sometimes, sure. But none of those are our jobs (except if you are a football player, politician, etc). Computer programming languages are our jobs. It's okay to have preferences. I (a full time front-end webdev), think Python is probably the best language out there. But it doesn't define me, because that's just silly.

I should probably have added "job" to that list. People certainly define themselves by their jobs. Not everyone all the time, but you can see it cropping up somewhere all the time even within a company.

And job grades, job titles, job seniority, place of education, type of degree, ...

Re: Why Go gets criticized so much

#116
post #59
post #28

I think there is a better explanation for why people dislike Go. All programming languages currently used for the web have gigantic downsides. They're slow. They have terrible package management. They have poor standard libraries. They have no static typing. They have no visual debuggers. They have no good IDE support. They don't integrate well with frontend code. Some programming languages are more flawed than other…

I can really relate to your post. I heard about go at a time when i was angry against python for having no type hinting and started to see people build tools parsing types in code comments, and at the same time being furious against the gigantic bloat that the java enterprise web frameworks had become. So, as you said, when i looked at go being a smart and small with a modern standard lib, and being modern in a way w…

If you avoid Spring, you can find some pretty nice and straightforward web frameworks in the Java space. The reason they often seem bloated is simply because they've been around a long time and so have accumulated many features.

If you want something similar to the Go standard library HTTP server, there is this one that comes with the JDK out of the box. Most people don't know it's there though, as technically it's not a part of the Java platform, it's just something that comes bundled with the standard JDK:

https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver...

If you're building a serious app you will want support for more advanced stuff. That's when you can upgrade either to a better HTTP server like Jetty, or to a full web framework that bundles templating, authentication, database access, session management and all the rest. Play! Framework is quite well known. It ignores all the standard enterprise Java conventions in order to be a lot more opinionated. If you like their opinions, that sort of approach can be way lighter.

Re: Why Go gets criticized so much

#117
"Go actively tries not to. There is no pattern matching, there’s no borrowing, there’s no pure functional programming, there’s no immutable variables, there’s no option types, there’s no exceptions, there’s no classes, there’s no generics…. there’s a lot Go doesn’t have."

But one of the things it does have is users. It's almost like language popularity is strangely orthogonal to that laundry-list of ideas that the language theory community have invested a great deal of time in. I'd hypothesize that for someone who is excited about those ideas seeing use (and therefore somewhat justifying the time invested in pursuing and polishing them), a language like Go skyrocketing in popularity relative to its age (http://www.infoworld.com/article/2981872/application-develop...) --- a language that looks at decades of PhD thesis work and says "tl;dr we have work to do over here" --- must be downright infuriating.

Re: Why Go gets criticized so much

#118

I would burn Go with fire and salt the earth because it's the bloody compiler will refuse to compile my valid code if I have unused imports or variables. It makes programming in Go a terrible experience and that's why I won't touch it.

This to me is one of it's benefits - uncommented, unused variables shouldn't be in code, and I like that the compiler is actively preventing me from being lazy and creating cruft that's simple to remove.

Re: Why Go gets criticized so much

#119
post #78

Earlier quoted context omitted.

Selling points are not facts, they're just arguments people who are trying to sell something like to make. Go's users and designers make all sorts of claims about it. As it happens, I've evaluated them and find that I often disagree with them. For instance, Go projects often don't specify the versions of their dependencies and choose to just clone the code into their own source tree instead - if you're lucky. If you…

"Selling points are not facts" except when talking about maintainability, you are not talking about facts. Show me the "fact" that Go is hard to maintain.

Counterpoint: Show the fact that Go is easy to maintain.

The language is, honestly, too young to have much "rubber meets the road" legacy code for anyone to make a strong evidential case with. It's all theory until a decade from now.

Re: Why Go gets criticized so much

#120
> Go is the only recent language that takes the aforementioned 40 years of programming language research and tosses it out the window.

> The mere existence of Go says “your views on what makes a good programming language are wrong”.

As someone that dislikes Go, that's not it. It's because Go doesn't "own" the fact that it thrown language research out the window.

If Go advocates waved their imperative programming flag proudly I would just ignore the language completely.

Post reply on HN