Hacker News new | ask | show | jobs
by dvirsky 3735 days ago
If you're looking for a sweet spot you should try Go.
2 comments

Go is a bitter spot in my book. All of the costs of a good type system like Scala's, but few of the benefits. (Go may well be better than Java, but why is that your point of comparison?)
this thread is about java vs python. go to me is a sweet sport between what I like about other strongly typed languages and what I like about python
The post you originally replied to was about Scala - if you're suggesting people use Go instead, we should compare Go to Scala.
Go feels more like C with garbage collection and a nicer standard library, but lacks the abstractions necessary to be anywhere near as expressive as Python, Ruby, Scala or even Rust. At the language level some advantages of Go include the fact that it's easy to learn and mostly hard to write unreadable code.
I'm very comfortable in Go, Java and Python, and in my experience Java and Go fill the same niche in terms of use case, but I'm way more productive with Go, for various reasons. And in terms of language, it's waaaaay less verbose than Java and I end up writing far less code to achieve the same goals.

I actually just had the experience of starting a project in Go, and after a prototype the company decided to reboot it in Java (for business and not technical reasons, basically the project started as a server and ended up being a library, so language popularity matters). It took me a lot more code and time to get the Java implementation to where my Go prototype was.

It might just be me, but in terms of a sweet spot between being productive and having high performance, Go is the best of both worlds. It's on par with Java in terms of performance, and slower than python to write - but not as much as Java (and for big projects I suspect you end up more productive in Go than in Python).

Go is just functional enough for me to free up some boilerplate that I feel more productive there. Structs and funcs are 90% things, and I only use a receiver on a func if it helps to clarify an operation or mutate that value. That Java doesn't give this choice directly is sad, but verbs in the land of nouns will do that.

A lot of my time is spent writing and reviewing Java code, which I still enjoy a bit.