Hacker News new | ask | show | jobs
by modersky 4079 days ago
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 sure there are others).

1. Scala does not form part of an established programming language tribe. It is neither a better Java nor a Haskell on the JVM. So people are challenged in their assumptions; they don't know what it is, and react negatively in order not to have to learn more.

2. Scala is pretty successful. So people in neighbouring language communities sometimes feel frustrated that a seemingly (to them) inferior language gets traction and their perfect language gets less. I saw some of that when Java eclipsed Smalltalk in the 90's. I never met a community as spiteful of Java as the Smalltalk one.

3 comments

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.

I would think that "people" were driving the company to the ground. I'm working on a large-scale Scala project that has been going on for years. The codebase is clean, methods are easy to reason about. It not as verbose as Java would be, there's no monkey-patching like you might see in Ruby, refactoring is much safer than it would be in JavaScript, and it runs on Linux much better than C# would. And thanks to FP the code is thread-safe and mostly free of side-effects (except where they're explicitly required). I wouldn't trade Scala for any other language, for this kind of work.
What kind of project is it? Genuinely curious.
Web app with complex, distributed back-end processing.
Is it an accident that you picked the worst offenders for each category? :)

Not as verbose as Java -> Java is probably the most verbose compiled OOP language

Refactoring is safer than it would be in JS -> I think with the IDEs this means almost nothing.

Runs faster on Linux than C# -> I mean seriously, Java's biggest advertised feature was multi-platform support while we know that Redmond guys don't care about other platforms too much.

I feel like you are trying to justify Scala by comparing it to other languages and picking a feature or property of those languages that is the worst or almost the worst.

How about this:

- Scala has such a nice type system that it blows out OCaml from the water - Scala running faster on Linux than C++

etc.

I would expect honesty when it comes to using languages that would drive this twisted and wicked developer world to something better. If we keep using the worst languages to compare to we are not going to improve. This is what I think.

Scala isn't the best at any of these things though. It's great because it's an all-rounder language.

How about this:

Scala doesn't - quite - have the safety and conciseness of Haskell. But it's close.

Scala doesn't - quite - have the enterprise support and tooling infrastructure (monitoring/instrumentation, profiling, debugging, IDEs, library ecosystem) that Java does. But it's close.

Scala doesn't - quite - have the clarity of Python. But it's close.

Scala doesn't - quite - have the performance of C++. But it's close.

Right. Let me take this from a different angle. I like to hear about projects moving away from technology much more than jumping onto a band wagon. Right now, Scala feels to me as a band wagon. Some of the guys who moved to use Scala from Java just simply moved back because they realized that almost all of the features are available (emphasis on almost) in Java (especially in Java 8). On the other hand, learning Scala takes time so for a while you are writing inefficient code. On the top of that you need to make sure everybody is on the same page in your team, that is also additional effort. All of these were driving projects (like Kafka) away from Scala (look at the new producer code).

To summarize: Scala to me is just a better Java with too many trade offs.

What scala does is sloppily bolt on everything without putting any checks or balances.

I don't doubt your sincerity.

Try to pull yourself out and understand it as an investor:

$500 a day to pay for a scala engineer. Not a word about the bottom line.

Python? Ruby? Are they algorithmically fast? No, but they ship and sell.

It's a way of saying that I value a language that is not too verbose, that doesn't encourage monkey-patching, that has strong types, and that works on Linux without too much trouble. The languages I listed do not meet at least one of my requirements, that's why I prefer not to work with them.
We use Scala for major projects too, I love the language and also the documentation, frameworks, (even sbt) and attitude of the MAJORITY of the community. Can you give concrete examples of what caused you to hate all of the above? Especially I'm interested in the community aspect. I've found the community very friendly and helpful, but perhaps I'm going to the wrong (i.e. right) places?
The problem with a survey asking people how much they love their language is that people will employ all kinds of biases to suppress the cognitive dissonance of choosing a terrible language.

The harder something was to succeed at, the harder you'll try to convince yourself it wasn't wasted effort.

Erlang is a pretty big omission in that list