Hacker News new | ask | show | jobs
by davidpayne11 5020 days ago
I'm genuinely curious - Scala is faster and better performant, what is there in GO that there isn't in Scala? I mean, if you were to build a highly scalable web app, why would you choose one over the other? Any thoughts??
3 comments

Ask what isn't in Go that is in Scala. The Go authors deliberately left out certain features to focus on what they call "clarity of design". I don't see them ever adding XML literals for instance!
It's worth reading http://commandcenter.blogspot.com/2012/06/less-is-exponentia... to get some idea of the motivation behind including less.

If you believe that our software systems are increasingly complex and that some aspect of the problems we're solving are essentially complex, then the strongest path towards simplicity lies in minimizing complexity incidental to the problems we're solving. One facet of programming which routinely introduces complexity is our tools, particularly our programming languages.

I believe both Rob Pike (and the Go authors) and Rich Hickey are both motivated in part by this impulse or a variation on it. They chose very different ways of addressing the problem, but Clojure and Go are a lot more similar than you'd think.

> If you believe that our software systems are increasingly complex and that some aspect of the problems we're solving are essentially complex, then the strongest path towards simplicity lies in minimizing complexity incidental to the problems we're solving. One facet of programming which routinely introduces complexity is our tools, particularly our programming languages.

That is true, but I'm not sure the correlation you seem to be suggesting here — that complex tools breed complex programs — is realistic.

A lot of the time, complexity can either live in your tools or in your program. For example, garbage collection requires a more complicated toolset than manual memory management, but in return it removes the complexity of memory management from your code. Similarly, ASM is simpler than C, and Whitespace is simpler than Python, but most people will agree that a program written in the latter tends to be simpler than the same program written in the former.

GC is an abstraction which, although complex in implementation, is something which makes your program simpler. So the correlation has less to do with how our tools are implemented, but the properties of the tools as we interact with them.

Also, simplicity, like security, is a trade-off. When performance is paramount, people will reach for C or assembly, and rightly so. Conversely if performance is not the #1 priority, developers feel free to use higher-level languages like Java or Ruby.

Also, I would say that Whitespace being "simpler" than Python is a fallacy, or at a minimum a reductive reading of the word "simple." I doubt the rules for writing in ASM, C, or whitespace are all that simple, despite the building blocks being relatively simple or few.

Honestly, I'm just repeating variations on http://www.infoq.com/presentations/Simple-Made-Easy.

Go does not require a JVM.
What isn't in Scala? It seems to include everything but the kitchen sink. I would prefer to read/debug Go code over Scala and that makes all the difference to me. Go is a simpler language. It seems you need a PhD to fully appreciate Scala.