7 ms·
Go solves a very specific problem: the limitations of Python, CPP, and Java within Google. That's it. Google maintains control over the constructs within it in
by brudgers 9y ago
Go solves a very specific problem: the limitations of Python, CPP, and Java within Google. That's it. Google maintains control over the constructs within it in order to standardize its (Google's) code. When only Google's code matters, there's no rationale for things like including generics and or consensus standardization via ISO.
That's not to say Go is bad. There can be a lot of overlap between the type of problems Google designed Go to solve and the types of problems other people and organizations often have. A lot of people write systems code. A lot of people experience the limitations of Python, CPP, and Java. Not everyone of course. I mean to me, the Go ecosystem looks so much like an "enterprise" decision that it would be mocked by the very people using it if Go came from IBM or Oracle.
- riku_iki 9y ago> the limitations of Python, CPP, and Java within Google What Java's limitations Go solves exactly?
- palerdot 9y agoAt the minimum, the verbosity problem. We can argue that any language is less verbose and more concise than Java. Go is inherently not a OO language and has some excellent functional constructs which makes it easy to approach and solve certain set of problems whereas in Java you are forced to do the OO way even if the problem at hand does not require that way of solving stuffs. Finally, Go compiles to machine code and I guess it should be way faster than Java.
- riku_iki 9y ago> Go compiles to machine code and I guess it should be way faster than Java. Java is also not interpreted for 20 years already. JIT compiler compiles jvm bytecode into machine code.
- nostalgeek 9y ago> At the minimum, the verbosity problem I don't believe a single second that Java is more verbose than Go. It's just that Go hasn't been buried under layers and layers of EE ...yet. In fact the whole "if err!=nil" boilerplate is the very definition of verbosity. > Go is inherently not a OO language Everytime you use interfaces you are doing OOP. And there is no choice but using interfaces when dealing with streams, which is 99% of what people use Go for. > has some excellent functional constructs No more than the latest Java. In fact Java has something Go definitely doesn't have which is pretty useful for functional programming: generics. > Finally, Go compiles to machine code and I guess it should be way faster than Java. AOT compilation is coming to Java.
- ihsw2 9y agoI have a hard time buying that EE cruft will creep into Go -- it specifically guards against inheritance/factory/DI hell by offering a unique type system (enforcement of clean interfaces between packages). If you try to implement Java-like design patterns in Go then you're going to have a bad time -- personally this is one of its strengths.
- riku_iki 9y ago> it specifically guards against inheritance/factory/DI hell by offering a unique type system Many people, including Google engineers (https://github.com/google/guice https://github.com/google/guice) see DI as useful tool, not hell. But nothing prevents you to write your java code without DI if you don't like it.
- smueller1234 9y agoDI is unquestionably, heavily used in Google code, including in Go code bases. Nonetheless, GPs point seems to be more along the lines that the type system helps avoid the horrible spaghetti of design patterns that many a Java project ails from. I'm not entirely sure about how much of that difference is a matter of culture vs. language and would love to see GP expand on their thoughts.
- deleted 9y ago
- brudgers 9y agoIn terms of Google's problems, one of the implicit problems with Java is that it is another language in the code base and requires tooling and maintenance. Less directly, there is also Google's relationship with Oracle in the context of the ongoing copyright litigation. Again, Go exists to address Google's problems which may or may not have some overlap with those of another organization or any particular individual.