5 ms·
Why do people choose 'Go' over Scala? The latter is a 'better' choice (in my opinion) for web applications and add in the play framework, you've got an ultra-fa
by neya 14y ago
Why do people choose 'Go' over Scala? The latter is a 'better' choice (in my opinion) for web applications and add in the play framework, you've got an ultra-fast, scalable web app. running in minutes. I do admit that Scala has a steeper learning curve, but my guess is that it's worth it.
Can anyone explain WHY Scala seems to be ignored by most of the programming community, especially here on HN, where everyone seems to be in favor of either Node.js or Go... ? Is there anyone who can provide some constructive negative feedback regarding Scala (apart from the learning curve) over GO?
- deleted 14y ago[deleted]
- meaty 14y agoBecause it requires an entire JVM of baggage, is terribly complicated and doesn't really give any benefits over anything else. Its like a Swiss army knife with a million blunt obscure tools rather than 5 useful sharp ones, or a crazy girlfriend who has three violent ex husbands who keep coming round to your house and lives with a crackhead. Go is a trip to your Volvo dealer - uneventful but you get what you want at the end of the day and get where you want to go and when you're done, you're done.
- jebblue 14y ago>> entire JVM of baggage It's comprehensive, stable, capable, reliable and understandable. >> is terribly complicated EJB's are complicated, the JVM isn't complicated. >> doesn't really give any benefits over anything else Check the list of companies and people using the JVM and languages implemented on it.
- meaty 14y agoYes I know. We use the JVM as well and EJBs and toplink and JMS and glassfish and all sorts of hellish enterprise stuff. People smoke. It doesn't mean its good.
- mafribe 14y agoIt's false to say that Scala "doesn't really give any benefits over anything else". For a start Scala programs tend to be 1/3 of the size of comparable Java programs, with all the concomitant advantages that brings.
- meaty 14y agoThat's still twice the size of everything else.
- deleted 14y ago[deleted]
- saosebastiao 14y agoDo you write rants like this for every article on HN which is not about Scala? As far as I can tell, different programmers like different languages for different reasons. I don't write webapps, but if I did, I would probably choose Clojure or Haskell or Python. You should learn to understand that by doing so, I am not insulting you or your language of choice.
- frou_dh 14y agoGo and its tooling have a strong "straightforward" aesthetic that appeals to some people. Languages that go after power and ecosystem are in a more crowded battle for mindshare.
- jlgreco 14y ago> Go and its tooling have a strong "straightforward" aesthetic that appeals to some people. Yeah, specifically I see it as part of the "worse is better" school of design, of which I am a great fan. A sort of 'cat -v' aesthetic. I find that working with a language, or on products, that have embraced that mentality is just so much... calmer. It puts me at ease, for lack of better terminology.
- zemo 14y agoGopher here. I'll try my best as to why I chose Go over Scala; this isn't meant to be "why I think Go is better than Scala", it's "how Go kept me interested from zero to gopher, while Scala failed to attract my attention". Scala didn't keep me curious for long enough to get good at it. I took a look at some examples, flipped through a textbook, and just came to the conclusion that there were way too many features and it appeared to be too clever for me to care. Things like impressive one-liners don't impress me; they do the opposite. That it's built on the JVM doesn't particularly appeal to me because I don't have any existing JVM-dependent projects. Examples like this: http://www.scala-lang.org/node/225 http://www.scala-lang.org/node/225 /** Turn command line arguments to uppercase */ object Main { def main(args: Array[String]) { val res = for (a <- args) yield a.toUpperCase println("Arguments: " + res.toString) } } the toUpperCase method being called without parens is bothersome to me, since it makes it ambiguous what is and is not a function call. The for loop being an expression is strange to me; it's a construct that appears to add no value to the programer, at a significant cost of clarity. It must make me seem very stupid to argue against looping constructs as simple expressions, but I think this type of notation is unnecessarily terse. Go doesn't have this type of thing, because the language is designed more for clarity than for terseness. I don't think that this is elegant: for (a <- args) yield a.toUpperCase I think it's far too clever. Beyond the method call, another thing that appears to be hidden here is the creation of the target list to which the uppercase letters are being stored. How many memory allocations are there in this statement? What if the body of that loop is conditional and we don't know how much space we need in advance? Yes, it's nice to look at, and I can see how it might be exciting to understand that for the first time, but... everything that it adds seems to be completely unimportant, but the operations that much be happening have been hidden from view. Great, we've saved a bit of typing, but in the process, we've lost a lot of understanding about how our program behaves. Then there are other simple things. I really enjoy that curly brackets are mandatory on looping constructs in Go; I noticed that Scala has the feature that you can leave them off and it only includes the next statement. I find that feature profoundly annoying and prefer that it does not exist. I really like the way the tooling enforces formatting. I really like the way that Go is militant. When I write Go, I feel like I'm at work assembling an information processing machine; I don't feel like I'm writing poetry. I don't want to feel like I'm writing poetry. I'm happy to be making information machines, because that's the honest truth of the craft. The poetry lies in what those machines do; the art is in the output. To me, writing a boring program whose code is very clever is like writing a boring poem in beautiful calligraphy and arguing that the beauty of the calligraphy makes the poem better. So that's why I went with Go, and not Scala. Of course, there are things I wish we had; specifically operator overloading and something akin to generics, the former we almost certainly will never get, while the latter remains an open question. A part of me misses having properties or Python's decorators, but... these are features that I've found can easily create maintenance problems; features that have caused trouble for me in the past. Go, of course, has its warts (some would argue that the language made entirely of warts), but while learning the language I always got the feeling that the things that were annoying were good for me; that the warts were like being told to eat your vegetables. After a year and a half of programming Go regularly, I've found that to be largely true. My old code is much easier for me to go back to than the equivalent in other languages, and I've found my Go projects to be very easy to maintain, overall. Go's code is the right level of terseness for me. It's far, far shorter than equivalent Java code and it's very clear. To me, elegance is clarity. To others, elegance is terseness. It's all a matter of opinion. I think you'd be hard-pressed to find someone that chose Go over Scala because of the merits of what can be built with one tool over the other; I reckon they're quite comparable in this regard.