Live data from Hacker News

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

news.ycombinator.com

71–80 of 134 posts

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

#71

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…

You really want a lot of type annotation anyway. They make error messages a lot more informative.

Scala is, by definition, a superset of Java. It's not ideal, but there aren't really any good alternatives.

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

#72
post #33

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,…

> crazy overuse of operator overloading F# might not be the best place to go then: http://stackoverflow.com/questions/2210854/can-you-define-yo... https://msdn.microsoft.com/en-us/library/dd233204.aspx

Most languages have similar capabilities. E.g. in Java you can define a method called ★★★ if you want (edit: this specific example doesn't seem to work, but certainly non-ascii method names are possible). The difference is cultural; Java libraries generally wouldn't define such a method, while certain Scala libraries might.

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

#73
as a reasonably seasoned non-scala programmer who was fairly new to scala, I think that it's a combination of 3 things combined together. Implicits combined with non-alphabetic dsls (somewhat combined with the removing the dots from the method calls)

.. additionally, I always found the scala equivalent of the javadocs harder to read.

The end result (for me) was that I'd download, say an HTTP library, all the method names would be things like '/' and '?' - and you couldn't actually see what a minimally functioning code should look like due to all of the implicits flying around.

If you compare this to java, which was undoubtably more verbose, but was easier to take and unfamiliar library, squint a bit, and see how the building blocks roughly fit together, using a combination of reading the docs, and looking at the intellisense in your IDE.

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

#74

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,…

Agreed that implicits were one of the critical things that caused me to move away from Scala. I really couldn't justify in my head the use of such a thing.

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

#75
post #22
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…

We used Scala for major projects; love the language, hate the infrastructure / documentation / frameworks / sbt / attitudes of many in the community. I believe this is a pretty common sentiment.

Basically I've seen this in person. Scala was driving the last startup I was in to the ground.

The thing that fascinates me is scala is like an art. It's like a new Obfuscated Perl Contest, but for functional programming. It doesn't really serve a purpose in legitimate business.

Scala code doesn't scale, it compiles too slow due to having too many features in the syntax. They took features normally meant for a standard library / external projects and literally augmented them into the syntax.

Scala, in it's current form, is a pipe dream. It really needs to be start over, but drastically simplified. Perhaps it should try to take a hit from Golang for compiler time advice: Simple languages compile fast and are easier to optimize.

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

#76

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…

There is such a thing as idiomatic scala? How? Care to elaborate?

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

#77
If any one from the scala community is hearing. This is what I have to say as a newbie who started learning Scala a couple of days back.

Free learning resources. There are no good free scala books which can teach you the language in the way it is supposed to be learned. Not something expected of a language which wishes to compete with something like Java on the longer run. The biggest issue I have faced so far is learning from scattered blog post all over the internet explaining the powers of scala, even before introducing how to use the very basic features to build simple things.

There is too much assumption about what the programmer already knows, or about the programmer's background is; while introducing these features. As some one who is not familiar with the Math behind most of these functional programming concepts, every thing goes over like water poured over a stone when the documentation talks about Types, Category theory, Monads. In fact it took me a great deal of simplification, and thought to understand concepts like map, reduce, foldLeft, foldRight. Most of it was in language totally unpalatable to an ordinary programmer. Talking in a language understandable only to Phd students won't work for nearly all of the programming world.

So far my introduction to Scala has been similar to seven blind men describing an elephant by touch various parts of the elephant's body.

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

#78
post #72
post #33

Earlier quoted context omitted.

> crazy overuse of operator overloading F# might not be the best place to go then: http://stackoverflow.com/questions/2210854/can-you-define-yo... https://msdn.microsoft.com/en-us/library/dd233204.aspx

Most languages have similar capabilities. E.g. in Java you can define a method called ★★★ if you want (edit: this specific example doesn't seem to work, but certainly non-ascii method names are possible). The difference is cultural; Java libraries generally wouldn't define such a method, while certain Scala libraries might.

Example in the wild:

https://bitbucket.org/fparsec/main/src/c234349e7b738e09a1b9e...

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

#79

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,…

That actually sounds like you encountered code that shouldn't have been or you had people using Scalaz (which has weird operators taken from Haskell, looking at you .)

For those who don't understand: Scalaz is an additional layer of syntax and tricks on top of what is already there. It seems to have quite a lot of power!

    implicit val option = new Traverse[Option] with MonadPlus[Option] {
    def point[A](a: => A) = Some(a)
    def bind[A, B](fa: Option[A])(f: A => Option[B]): Option[B] = fa flatMap f
    override def map[A, B](fa: Option[A])(f: A => B): Option[B] = fa map f
    def traverseImpl[F[_], A, B](fa: Option[A])(f: A => F[B])(implicit F: Applicative[F]) =
      fa map (a => F.map(f(a))(Some(_): Option[B])) getOrElse F.point(None)
    def empty[A]: Option[A] = None
    def plus[A](a: Option[A], b: => Option[A]) = a orElse b
    def foldR[A, B](fa: Option[A], z: B)(f: (A) => (=> B) => B): B = fa match {
      case Some(a) => f(a)(z)
      case None => z
    }
  }
Excerpt from https://github.com/scalaz/scalaz#type-class-instance-definit....

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

#80
post #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.

Is there any linters available for IDE's to ensure conformance with a vanilla ruleset of scala? If that existed, scala would be able to shape itself up nicely.
Post reply on HN