5 ms·
I can understand people who don't like Java for various personal aesthetic reasons, but I can't understand people who don't like Java but like Go. If you like G
by pron 9y ago
I can understand people who don't like Java for various personal aesthetic reasons, but I can't understand people who don't like Java but like Go. If you like Go but don't like Java, then either you don't know one or the other well enough, you get distracted by unimportant details and are expressing a "narcissism of small differences", or you're expressing an emotional bias that has nothing to do with technical facts. Seeing that you can't appreciate a low-level scheduling algorithm that would be pretty much identical in any language (this particular Java code is so low-level, that it's almost C) shows that at least the second reason holds.
Having used both Java and Go, the two seem almost indistinguishable to me (well, they differ in many details, but none that matters much, and their more pronounced differences have nothing to do with linguistic features); Java is more or less Go with generics and exceptions.
- grey-area 9y agoJava is like Go with generics, exceptions, inheritance (which the author of Java thinks was a mistake), and a separate runtime (JVM). Those four things alone are pretty big differences, and then there are more intangible yet important differences like stdlib and culture, and implicit interfaces. They are definitely in the same family, but not as closely related as you imply - they are not indistinguishable. I'd say the similarities are more in unimportant stuff like syntax, some of the differences are important.
- weberc2 9y agoI think one of the biggest differences is that Go has only value types and references thereto (including the builtin data structures, which are basically just fat pointers). Even if Java gets value types, there will be a huge and useless value/class dichotomy as in C#. But there are dozens of other misfeatures in Java, such as protected/final/first-class-constructors/explicit-interfaces/etc. And this is just the language--the tooling is even worse (and no, a huge, fragmented ecosystem of kitchen-sink tools is not "better" than a few, simple, purpose-made tools). All that said, I have a lot of criticism for Go as well, especially as a language. I just can't see Java being on par with Go, even with generics. Of course Go has more than a decade of hindsight that Java didn't have (or at least Java was in too deep by then to make the requisite changes).
- stcredzero 9y agoBut there are dozens of other misfeatures in... Basically applies to most mature widely used languages that have evolved by adding features. In many software projects, the bias is on the side of adding too many features and not accounting for the costs, to the point where someone feels a bit of pain and complains. In Go, the bias is in not having enough, to the point where someone feels a bit of pain and complains. I'd bet that more language designers are going to opt for the 2nd strategy as we go forward in the 21st century.
- pron 9y agoThe dynamically linked runtime and the JIT are indeed important differences (although not all JVMs share HotSpot's design; some JVMs compile Java AOT and statically link the runtime) -- but they are not linguistic differences, and so nothing that the commenter I responded to could see in the code. In any event, even regardless of how big you think the linguistic differences are, Java and Go are far too similar to like one and so strongly despise the other (although you could certainly prefer one over the other). We're not talking Go vs. Haskell, or Python vs. C here.
- jrs95 9y agoEven though the languages may seem quite similar, the cultures of the two communities and how software tends to be written in each language is vastly different in my experience.
- nicpottier 9y agoYes, totally agree. In my opinion, Java is a great language that has was ruined by enterprise adoption. SOAP, JavaBeans etc, set this precedent of crazy over-engineered solutions in Java and it has never really recovered. Go seems to attract C and Python programmers that prefer simpler interfaces and doing more with less. It is just a different culture, though I would agree from a language perspective they are very similar. Which is great, choices are good and you can pick the culture you prefer, but you can only say the languages are similar if you ignore this huge chasm in their cultures.
- _ph_ 9y agoSorry, I have programmed in Java since 1995 and am now using Go for some years. There are huge differences, so I wonder how you could call those languages somewhat close. Some of the differences, which make me favor Go over Java are: - functions: Java does not have functions, only methods - closures: Not sure of the latest state, but until very recently, Java had no closures. Closures are a huge and important element of programming. - single file executables: make your program easy to deploy, without shipping a JVM, setting up a classpath etc. - value types: have control to which structures you want to refer by pointer and which should be treated as a value - goroutines+channels: a far better approach to parallel programming, a goroutine is much more light-weight than a Java thread - no generics the Java style: eventually Go needs generics, but not in the way Java implemented them. - no frameworks: possibly not a strict language related issue, but Java grew monstrous frameworks, the Go community has been stay away from them so far.
- pron 9y agoI could list more reasons for which I prefer Java for large, serious projects (I prefer Go for smaller things) and some of the reasons you list are outdated, but that's not my point, as I don't wish to argue which of them is better (neither is, IMO), nor to focus on their differences. My point is that in terms of language and programming style, their similarities so outweigh their differences, that I cannot understand how one's opinion of both can vary by too much. This is doubly clear when you compare Java and Go to, say, Python, Haskell, JavaScript, OCaml, C++, Rust, Clojure, Scala, Eve, Erlang, Pony etc. If your experience has been mostly in Java and Go, you focus more on their difference, but in the context of all other programming languages that truly differ from those two, I find Java and Go -- at least in terms of linguistic features -- nearly indistinguishable.
- _ph_ 9y agoI have plenty of programming experience beyond Java and Go :). Currently I am mostly a Lisp programmer, that is why I consider the existence of closures and functions such a huge differentiator for Go vs. Java.