5 ms·
It's not hard to find people switching from Java to Go (e.g. http://www.infoworld.com/article/2608571/application-development/article.html http://www.infoworld.
by dsymonds 11y ago
It's not hard to find people switching from Java to Go (e.g. http://www.infoworld.com/article/2608571/application-development/article.html http://www.infoworld.com/article/2608571/application-develop..., which I found within 10 seconds of searching).
It's true that Go doesn't have a lot of those powerful JVM features that you listed, but as with any engineering trade-off there are lots of people who judge the benefits of Go to be worth the loss of those things.
- pron 11y agoOf course there are people making the switch, but the numbers are not nearly as substantial at as people switching over from scripting languages (even in nominal figures, let alone percentage) -- which perfectly makes sense. You'll also note that since that article was published, all the advantages listed in in it have either found their way into Java (lambdas, fibers) or to other similar languages like Kotlin (multiple return values). Go has the undisputed upper hand when it comes to command-line apps (I really like it that I can use a language so similar to Java for stuff I never liked using Java for, and I was never fond of using scripting languages that require tedious dependency management for standalone programs), but is at a fundamental disadvantage when it comes to long-running important servers.
- dsymonds 11y agoMaybe it's just that Python/Ruby programmers are more inclined to publicly discuss their switching?
- vorklerta 11y agoGo is particularly well suited to long-running critical server apps. It has fewer GC issues compared to Java and is also simpler language (making it harder to screw things up - Java generics can get very complex).
- pron 11y ago> It has fewer GC issues compared to Java No, it has more GC issues. It's just that there aren't yet enough libraries and big applications to make that apparent. It hasn't been stressed enough just yet.
- myg204 11y agoIt may have more GC issues, or maybe it probably has more GC issues.
- pcwalton 11y agoI think it's likely that Golang apps won't stress the GC as much as Java does, because of the simple fact that you can't realistically use j.u.c-style concurrent data structures, since you don't have generics. Where the JVM GC really shines is when you're using shared-memory concurrent data structures, which are really great things—however, without generics, programmers just won't use them in the first place. (I'm not saying this is a negative for Java, BTW; making shared memory data structures both fast and idiomatic is really important if you care about performance of parallel code.)
- pron 11y agoWhy do you think generics are more relevant for concurrent data structures?
- pcwalton 11y agoBecause "programs don't need more than one type of dictionary, so the language can just hard code one implementation in" is at least a defensible position in a single-threaded setting (although I don't agree with it), but it definitely isn't in a scalable parallel setting.
- justthistime_ 11y agoYeah. Go. The concurrent language with a single, mutable, thread-unsafe dictionary implementation.
- pjmlp 11y ago> Go has the undisputed upper hand when it comes to command-line apps Only because most developers don't care to look for the JVMs that offer AOT or refuse to use anything other than the OpenJDK.
- twic 11y agoThat particular example of someone switching is someone whose background is in Java, but moved to a project implemented largely in Go. He switched because he changed projects.