3 ms·
> I just don't think Go has a place in new code This makes a lot of sense. I've seen and worked on code at a large US tech company that is mainly reliant on go
by apta 7y ago
> I just don't think Go has a place in new code
This makes a lot of sense. I've seen and worked on code at a large US tech company that is mainly reliant on golang for its services, and let me tell you, it's hideous. It's very verbose, and they end up reinventing everything you have in Java land anyway in a much more verbose and error prone way. You also end up losing on the tremendous monitoring and management capability of the JVM, as well as the extremely mature and diverse ecosystem, with integrations into basically anything you can think of. You want to integrate into an "enterprise" system or infrastructure? ew who'd want to do that? we use golang because it's hip, who cares about about all that money making business?
The funny thing is, there's still no getting away from Java/JVM, and they have a good number of services running on the JVM (particularly security related, and data processing pipeline services).
While the language is "simple" (i.e. underpowered) enough that you can read it, it immediately translates into verbosity and complexity in the code base, with things like helper functions that are basically "map/filter/etc" calls in any sane language taking up 8-10 lines of code scattered everywhere, as opposed to them taking a single line of code as they're supposed to. Not to mention things like JSON handling, validation (non-existent way to do them in a non-error-prone way, unlike annotations or attributes in JVM/.NET), no way of doing compile time DI (unlike e.g. Dagger or micronaut on the JVM), the list goes on.
Java the language is improving with things like switch expressions, records, and value types being added. The JVM itself is getting fibers, and better native integration for high performance work. GraalVM enables compilation to native binaries if needed.
You also have languages like Kotlin to use on the JVM if you don't fancy Java itself.
The only reason golang is being pushed around is hype. It's so underpowered that using it for any moderately complex domain becomes a mess. Even generics if they decide to add them won't fix that.
- simiones 7y agoI agree with almost everything you said. However, there is one point where I think you're wrong: the only advantage Go still has over java (as it exists today) is the size of the runtime - you can get a Go container serving an HTTP server in ~10MBs of size and similar amounts of RAM - this is still a far cry from what I've seen Java achieve. This is not important in many use cases, but if you are planning to run a microservices architecture, this can help a lot with horizontal scaling costs.
- apta 7y agoYou might want to check out: https://quarkus.io/ https://quarkus.io/ or https://micronaut.io/ https://micronaut.io/ for that :)
- simiones 7y agoyes, these are very promising projects, but they are just starting out this year unfortunately. I hope they will prove to be stable and close enough to the OpenJDK as time goes, but I wouldn't bet a new product on them just yet, unfortunately.