Live data from Hacker News

Why Go gets criticized so much

npf.io

161–170 of 251 posts

Re: Why Go gets criticized so much

#161
post #112

Earlier quoted context omitted.

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.

The general principles for fault tolerance require Separation of Concerns vis. Error Encapsulation (make sure that the contagion doesn't spread), Fault Detection (make sure that you know that someone is infected), and Fault Identification (you have ebola!). Error encapsulation (and this applies equally to modules, components, systems, architectures, organizations) is invariably best done at the lowest level possible,…

"The problem with handling everything right away is that it lacks flexibility to handle things in what could be the optimal manner."

You can pass the error (or another) up the stack. The language is flexible.

Re: Why Go gets criticized so much

#162
post #142

Earlier quoted context omitted.

I don't dislike Go. I just think there are zero use cases where Go is the best choice. But what I do dislike is when people try to hype and con others into adopting a language to justify and increase the return on their own time investment.

> But what I do dislike is when people try to hype and con others into adopting a language to justify and increase the return on their own time investment. The same can be said of any programming language community, IMHO.

True. This is why I find the point of the post kind of "backward". I don't think most people hate something because they feel attacked in their identity. I feel like it's the opposite: most people defend a certain technology at all cost because they feel attacked in their identity when somebody criticizes it.

Re: Why Go gets criticized so much

#163

Earlier quoted context omitted.

If that's an accurate summary (I am not commenting on that fact), it's a completely clickbaity summary. Because it applies equally to why everyone hates every even semi-popular language (other than their one true love, if it's considered sufficiently popular).

For a one line summary, it's pretty accurate, but it's also a great illustration of why basing opinions on one line summaries is often a bad idea. The difference between Go and pretty much every other semi-popular language is that Go is very much defined by what it isn't rather than by what it is . In that way, its success is an implicit criticism of other languages much more than the success of any other language wo…

What's worse, is that it's a criticism backed up by empirical data. But programmers are unique and lucky, in that they get to be illogical and dogmatic while getting to appear rational and technological.

Re: Why Go gets criticized so much

#164

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.

I use both styles in the same code:

  if (simple_condition) {

  } else {

  }

  for (long and stuffed;
       expressions;
       here)
  {
  }

  if ((complicated ||
       multi_line)
      && condition)
  {
  }

  void function()
  {
  }
In an if, all the "else if" and "else" clauses have to follow the same style. If any is braced, they all have to be.

By the way, is grandparent kidding about Go enforcing this?

The only language I can think of which enforces curly brace placement is Awk. (And only in its pattern-action pairs):

   BEGIN {
     function()
     {
        if (foo)
        {
        }
     }
   }

   /regex/ {   # can't move this curly to next line
     action
   }

Re: Why Go gets criticized so much

#165
post #64

Earlier quoted context omitted.

"All" languages used for the web have those downsides? This is part of why Go culture scares me a bit. You seem to be overlooking the huge amounts of software written in .NET and on the JVM, none of which suffers from the problems you just outlined: there are great IDEs, decent type systems, good interactive debuggers, strong standard libraries, reasonable package management etc. This mental blind spot towards the to…

I deliberately didn't mention specific programming languages because I knew that would lead to bickering about the relative merits of Python vs Java vs .NET vs Clojure, which would just distract from the greater point. Your curious assertion that I'm somehow part of "Go culture" only confirms this. I think we can do a lot better than .NET or Java. .NET isn't even cross platform and Java has a lot of legacy cruft. Not…

A sample from the newer stuff in the .NET world: http://nancyfx.org

How modern is that for you?

Re: Why Go gets criticized so much

#166
I worked with C professionally for 2 years. It was horrible (besides performance), especially since I switched from PHP, Java and Javascript.

Then I worked professionally in go. I thought it had the performance of C that I loved. But really, it's not as fast as C but it sucks just as bad.

Now I'm completely Javascript, and I won't ever switch.

Re: Why Go gets criticized so much

#167
post #77

Poor post. One of the worst thing you can do in a debate is to psychoanalyze your opponents, ascribe their stances to some sort of personality trait, and ignore the object level. More mundanely, it's just ad hominem, "haters gonna hate". What little object-level substance is to this post is laughable. Basically: since Go doesn't have modern language features but it's evidently popular and works, all the people who li…

Go sucks if you've ever actually programmed in it. Try it, just try the hello world example, seriously.

Re: Why Go gets criticized so much

#168
I'm one of these ML-derived ideologues this article disparages. I hate Go precisely because of the reasons outlined in this article. In my perspective, OCaml and occupies mainly the same niche that Go does (same balance between high-level and low-level, same skepticism of the object oriented orthodoxy, etc). OCaml is a much better language than Go for so many reasons that I will not go into here.

I'm also a Googler. Rather than inventing Go, if Google instead would have made OCaml its "Go", the world would be a better place than it is today. If the same tooling were built around OCaml, with some problems of its implementation fixed (multicore/parallelism, etc), there would be no complaints.

Re: Why Go gets criticized so much

#169
post #161

Earlier quoted context omitted.

The general principles for fault tolerance require Separation of Concerns vis. Error Encapsulation (make sure that the contagion doesn't spread), Fault Detection (make sure that you know that someone is infected), and Fault Identification (you have ebola!). Error encapsulation (and this applies equally to modules, components, systems, architectures, organizations) is invariably best done at the lowest level possible,…

"The problem with handling everything right away is that it lacks flexibility to handle things in what could be the optimal manner." You can pass the error (or another) up the stack. The language is flexible.

"Passing up the stack" is fairly minimalistic in an environment where you could be running thousands of goroutines, some (many?) of which may share memory.

If you do it that way, you seem to forego a lot of error encapsulation straight away and quickly find yourself into undefined territory.

Re: Why Go gets criticized so much

#170

Disclaimer: I work at El Goog. I recently moved teams so that I could use Go exclusively. It's often been said that Go solves the problems Google developers have, and it's 110% true. It's much easier to get things working, and it's much easier to write things like Protocol Buffers. But the key for me is that Go isn't fun in the sense of "wow, I'm so smart that I managed to one line this thing", it's fun in the "wow I…

The reason Google's Java codebase is impossible to understand is not the language, it's mindless application of 'best practices' like dependency injection on an industrial scale. Guice is open source, anyone can go look at it. Just imagine a big complex server in which the "new" keyword wasn't used anywhere because everything was handled by the dependency injector. You get these things: 1. Things that should be compi…

Very recently I have begun to work as programmer, and having to work with PHP I looked at phpunit and unit testing (first time I do it semi-seriously). The guidelines for mocking that I have found are about dependency injection (phpunit has some helpers, but I think that's it).

What is the alternative to it?

Post reply on HN