Live data from Hacker News

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

news.ycombinator.com

31–40 of 134 posts

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

#31

I wouldn't say hate. Scala is a OO-functional language, so it's bound to have people who dislike it from both of those camps. I started learning Scala (it got me into functional programming) but dumped it for the same reasons as Java. It's bloated. I also question Scala's longevity. I'm happily using Elixir and Clojure these days, but I mainly do web stuff so YMMV.

You question the longevity of Java and Scala, and this is why you use mini niche languages? Seriously.

Corrected.

Elixir as a language may or may not last. I'm betting it will, but even if it doesn't, it works well with Erlang which is going nowhere.

There's more a case against Clojure, granted. I think because Scala is seen as a bridge language is the another reason why it won't last.

Also the compiler drama... http://www.infoq.com/news/2014/09/scala-compiler-forks

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

#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

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

#34

I was a big fan of SML, and really wanted to like Scala. The reason I didn't pursue it was the language is really complex (imo) kitchen sink as others have said, and as others have also said, there's no one best way to do things, no clear idiomatic style. Plus there was a bit of churn in the language in the beginning. I concluded that if I was going to use the jvm, may as well just stick with Java, or another jvm lan…

Jython or groovy have more market share than scala?

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

#35
I'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 type system seems less helpful than Haskell's (e.g. why is "asdf" + 3 not a type error?)

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

#36
post #35

I'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) is because Scala attempts to preserve Java semantics for strings. I agree that this is a mistake.

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

#38
post #16

I dabbled in scala for a while a few years ago and ultimately decided not to invest the time becoming an expert in it for the following reasons. 1) Slow compile times, I really value fast feedback and if it takes me over a second to compile and run a unit test that just doesn't cut it for me. 2) No clear idiomatic style and having many different ways of doing things each of which can imply different behaviour in diff…

I used to feel the same way about fast feedback, but after working on slower to compile applications for a few years, I'm not sure it's a good way of working.

When I used to work like that, I'd write code, and constantly be checking that it compiled. I'd be watching my test dashboard and feel happy turning the lights green. But it was definitely a crutch.

If you asked me to code without a compiler I'd make basic syntax errors. I'd let basic, predicable bugs slip through because they weren't covered by my tests. In my rush to turn the next light green, I wasn't thinking enough.

Maybe that's not how you work, but if it is, try building once a day and turning syntax highlighting off for a couple weeks. For me, (being forced to) work like that for a while has helped me long term.

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

#39

I was a big fan of SML, and really wanted to like Scala. The reason I didn't pursue it was the language is really complex (imo) kitchen sink as others have said, and as others have also said, there's no one best way to do things, no clear idiomatic style. Plus there was a bit of churn in the language in the beginning. I concluded that if I was going to use the jvm, may as well just stick with Java, or another jvm lan…

Jython or groovy have more market share than scala?

Where does 'market share' appear in my post? At no point do I make any claims on market share. Thanks for the charity[1]

My intent was to imply that since jython is a python implementation, the language itself is more widely 'accepted'. Where accepted may mean "in general use and considered to be a good langauge". Groovy has been called a better java by some. Another example would be JRuby.

[1] http://en.wikipedia.org/wiki/Principle_of_charity

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

#40
There has been an... unfortunate community attitude. Some people were quite unwelcoming to newcomers. I think this is down to two individuals; nowadays many friendlier folks are writing Scala libraries and hopefully the community will improve.

I get the sense the Java community is also unused to interacting with other languages, because for a long time the JVM was a world unto itself. Most languages have a spectrum of "neighbour" languages and so users are used to working with at least slightly different alternatives. Scala is possibly Java's closest neighbour (Groovy is not really popular enough to show up on the radar of most Java devs) and it's become something very different, so there's a real culture shock just trying to talk to each other. A lot of Scala folks take a lot of assumptions for granted that are very alien to Java folks.

None of which really takes away from the language itself, if you're willing to learn on your own or tolerate a few insults when you ask for help. IMO it is very much worth it: Scala is genuinely the best practical language available today (it has more than its fair share of warts but they're mostly for JVM/Java compatibility, which makes it so much easier to introduce to business than e.g. Haskell).

Post reply on HN