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.
Ask HN: Why do people have a hatred for Scala?
111–120 of 134 posts
Re: Ask HN: Why do people have a hatred for Scala?
#112I 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…
Re: Ask HN: Why do people have a hatred for Scala?
#113I'm currently learning Scala (background in Python and Haskell) and I have encountered a few road blocks: 1. The REPL is not very helpful: You cannot look up documentation a la IPython (i.e. myFunc?) or inspect objects easily to find out how things work 2. There always seem to be 10 ways to do the same thing. This makes it much harder to understand other people's code than when there is just one way to do it. 3. The…
3. Some of these are backwards compatibility. You can get a more helpful typesystem by setting a few flags: https://tpolecat.github.io/2014/04/11/scalac-flags.html
Re: Ask HN: Why do people have a hatred for Scala?
#114Earlier quoted context omitted.
> Everyone agrees Scala is too complicated. This is not true.
Everyone who hasn't used it for at least a year or more than three.
Re: Ask HN: Why do people have a hatred for Scala?
#115Scala grew really fast off of an interesting, new academic ideas. There are a lot of stretch marks.
Could you give an example?
Re: Ask HN: Why do people have a hatred for Scala?
#116I don't like Scala for the same reason as C++. Scala has an incredible semantic complexity with a Perl-like syntax. Too much magic going on.
Yes magic is one thing that makes it difficult to get into a language and to maintain code written in that language, where of course maintaining can mean going back to code you wrote last month. One of my pet hates in C++ was implicit casting and I'm hearing that Scala does similar, which is putting me off it.
To my mind Scala is a very unmagic language; very complex libraries are written for it, but they're never magic, they're always ordinary Scala code and ordinary Scala features, just combined in clever ways. E.g. typeclasses are a language feature in Haskell, but in Scala they're just a pattern that you implement using implicit parameters. Actors and messages are a language feature in Erlang, but in Scala they're just a library with methods that you call. Type-level functions are a language feature in e.g. Idris, but in Scala (e.g. Shapeless) they're just a technique making use of implicit resolution.
Re: Ask HN: Why do people have a hatred for Scala?
#117People 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.
Re: Ask HN: Why do people have a hatred for Scala?
#118Earlier quoted context omitted.
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…
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…
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.
Re: Ask HN: Why do people have a hatred for Scala?
#119Earlier quoted context omitted.
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…
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.
> $500 a day to pay for a scala engineer. Not a word about the bottom line.
Maybe - I don't make that much and I have 5 years' Scala experience. (I have a relaxed environment and great culture though, so I'm not complaining). What I really don't get is Java companies where developers are chomping at the bit to use Scala and management says no - your devs are volunteering to become devs that companies would pay 2x for, the least you can do is let them.
Re: Ask HN: Why do people have a hatred for Scala?
#120Earlier quoted context omitted.
+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.
You might also want to look at this excellent talk titled 'Toward a Safer Scala' at https://docs.google.com/presentation/d/1tCmphnyP3F5WUtd1iNLu... that recommends a number of best practices that can be followed using Scala.
If you're using sbt, I put together a giter8 template for scala/sbt projects that follows these best practice recommendations at https://github.com/hohonuuli/basicscala.g8