Live data from Hacker News

Ask HN: Why do people have a hatred for Scala?

news.ycombinator.com

41–50 of 134 posts

Re: Ask HN: Why do people have a hatred for Scala?

#41
post #19

In 2015, XML is a first class citizen but JSON get a third class treatment. JSON parsing in Scala is ridiculous. http://www.reddit.com/r/scala/comments/2l7v5u/json_parsing_i...

XML is in the process of being demoted.

spray-json is quite possibly the best JSON library I've ever seen, in any language.

Re: Ask HN: Why do people have a hatred for Scala?

#42
I don't hate it. Scala looks cool and I might use it if I had to use the JVM.

What turns be off from looking into it much:

Verbosity. It seems that it can't infer types in as many places as an ML. I prefer rather succinct code. I understand Scala has a powerful type system and it isn't always possible, but... ugh.

OO. Scala seems to want to really embrace Java's OO model fully, and that's a bit ugly. It's probably a good practical decision but feels like a turn off. Again, I haven't used Scala, this is just an impression I have.

Re: Ask HN: Why do people have a hatred for Scala?

#43
post #5

People who actually use Scala love it. For instance, Scala is one of the most loved languages in the recent StackOverflow developer survey. The survey had more than 26'000 respondents, so this is pretty significant. http://stackoverflow.com/research/developer-survey-2015#tech... But you are completely right that there's also a lot of negative sentiment around it. Here are two possible reasons I can think of (I am sur…

Erlang is a pretty big omission in that list

Re: Ask HN: Why do people have a hatred for Scala?

#45
I can speak from my own experience with using it on a growing team: Don't.

It's a very powerful and expressive language. That translates to "completely unreadable by people without at least a few months direct experience in it." If you plan on introducing people with little to no scala experience to your code base regularly you will probably want a different language or to severely limit your allowed feature set.

Re: Ask HN: Why do people have a hatred for Scala?

#46
post #24

Everyone agrees Scala is too complicated. Beyond that, there's a flexibility problem: Scala allows you to write a global mutableMonadFactoryFactoryMonad. That said, nothing does exactly what Scala does. Fluently mixing imperative, lazy, OO and functional styles isn't really common. Neither is the wealth of concurrency constructs available to Scala programmers through the standard library and Akka. I'm writing a compi…

> Everyone agrees Scala is too complicated.

This is not true.

Re: Ask HN: Why do people have a hatred for Scala?

#47
I have used Scala for building business solutions since 2012. I had been maintaining PHP and Rails systems of 50k to 150k LOC prior to the switch. I still have to maintain PHP and Rails systems. The move to Scala was driven by the need for better performance, system resiliency, and to mitigate the effect of multiple developers coming in & out of a codebase. It turns out to be ideal for this.

Idiomatic Scala is not a grab bag of features or paradigms. It is firmly based on programming with expressions and using the type system to improve abstraction. Statements and mutable data structures show up when interfacing with external systems or for performance reasons. The Collections libraries are arguably "object-oriented" as that term is commonly understood, but this is not typical for application code. However, object-oriented features such as objects, classes, and traits are the basis of Scala's module capabilities.

For programmers coming from 20th century mainstream languages that are all based on programming with statements, mutable variables, and are arguably a thin abstraction over the machine itself, programming with Scala can be a challenge. If you want to do your familiar imperative style of programming, Scala is going to be painful. Use another language. But if you would benefit from a type system and good support for expressions, then Scala is possibly the best choice currently for growing business applications. We are not in 2005 any more.

Scala is not ideal as an introduction to functional programming. Other languages, such as F#, SML, OCaml, and Haskell have better, simpler syntactic support for features associated with functional programming.

People who dislike on Scala are probably either stuck in the past or don't have pain that Scala would solve.

Re: Ask HN: Why do people have a hatred for Scala?

#48

In my opinion (and I have worked on large scale development in Scala in the past) it is just unnecessarily complicated. Random annoyances off the top of my head - you can't necessarily understand an isolated function unless you know what implicits are being used, crazy overuse of operator overloading and slow compilation times (this has improved over the years). You don't have to learn Scala, you could learn Clojure,…

+1 Implicits. We put very strict limits on use of implcits. They make code extremely difficult to reason about, but can also be incredibly dangerous. I once stumbled upon an implicit cast of Int to Float... Oh, my.

Re: Ask HN: Why do people have a hatred for Scala?

#49
post #30

I think it's because they went into it for the wrong reasons. If you jump into a language because it is the latest fashion, and not for solid engineering reasons, then it will be an uphill struggle to reach your goals. I have only dabbled in Scala myself, kicked the tyres as it were. My question was, is this an Ocaml or Haskell with good interop with the Java ecosystem? The answer is no but I don't hate Scala for it,…

There's actually a port of OCaml to the JVM that has pretty good interop with the Java ecosystem, or at least it will once it's out of beta: http://www.ocamljava.org/.

Re: Ask HN: Why do people have a hatred for Scala?

#50

I don't hate Scala but I did not pursue it after only a few 'lessons' : transitioning from Java to Scala was smooth and not intellectually stimulating. On the other hand , Clojure programming forces me to think differently and the solutions are more elegant. I understand Scala is also functional but it is too permissive and I slide back in imperative all too easily. Clojure is highly disciplinarian and opinionated an…

But how effective is Clojure in writing server side code? I've never used it so I have no way to know.

One of the best decisions I made was to transition from J2EE server code (Spring+ hibernate + Jsf/(some)SpringMVC ) to Clojure ring + Moustache. The code is smaller, simple to understand and concurrency is a breeze. The only downside is you can't write a SOAP server as XML namespace support is missing in its xml library.

edit : typo

Post reply on HN