
Another Scala rant on HN - nuriaion
https://groups.google.com/forum/#!topic/scala-debate/153H3Ya4Nxk
======
darklajid
I'm positively surprised.

Given the headline, the cause for that thread, I expected a heated debate,
laying blame everywhere. Instead I found a reasonable (if a bit defensive - if
Martin is the creator of Scala I can totally understand that) poll for ways to
improve Scala's flaws and image problems.

The discussion was mostly a very good read as well. I haven't written a single
line of Scala in my life (I'm a fan of Clojure and F# to some degrees), but
this thread looks gives me the impression the Scala community is mature and
open.

Basically that thread managed to offset a number of "Scala's not working for
me" reports by itself.

~~~
StavrosK
> if Martin is the creator of Scala

I'm not sure if you're saying "If the person who goes by the name of 'Martin'
in the list is Martin Odersky, the creator of Scala" or "If this 'Martin' guy
is the creator of Scala". In both cases, this seems to be a yes, since
Martin's email address on the list begins with "ode...@".

~~~
rz2k
I think its more like "if three is prime...", where there isn't doubt that
Martin is the creator, but that being the creator makes being defensive
understandable.

------
anatoly
The first message in the thread, from Martin, really surprised me with its
absolute lack of awareness of selection bias:

>Seems hardly a weekend goes by these days without another Scala rant that
makes the Hacker news frontpage. [...] There certainly seems to be a grand
coalition of people who want to attack Scala. Since this has been going on for
a while, and the points of critique are usually somewhere between unbalanced
and ridiculous, I have been curious why this is. I mean you can find things
that suck (by some definition of "suck") in any language, why is everybody
attacking Scala? Why do you not see articles of Rubyists attacking Python or
of Haskellers attacking Clojure?

He doesn't appear to even consider the possibility that he might be noticing
the anti-Scala rants more readily than rants against other programming
languages. Not having considered the possibility of the bias, he has no chance
to try and correct for it. The wildly distorted impression he's formed leads
him to language bordering on conspiracy theories ("grand coalition of people
who want to attack Scala").

There just haven't been that many anti-Scala posts and discussions. Perhaps a
bit more of them in the last two years, but not an avalanche by any means.
Meanwhile, every language Martin's mentioned has been getting its share of
attacks and (mis-)representations. Seriously, Zed Shaw's "Rails is a ghetto"
rant alone has been more discussed and disputed and reblogged than _all_ of
the anti-Scala posts put together, I'm sure.

Selection bias is incredibly pervasive, and you invariably succumb to it
unless you consciously remember to be aware of it and try to correct for it
(and then you succumb anyway, but hopefully to a lesser degree). It surprised
me that Martin Odersky seemingly didn't realize that.

~~~
sheetjs
A cursory search for scala stories shows glowing scala stories appearing far
more frequently than criticisms

As for selection bias, keep in mind that many sharp people can be insecure.
It's natural. But the best and brightest are able to cut through the
criticisms, recognize the underlying issues, and react accordingly.

------
trailfox
The quality of the original "1-star" blog post was extremely low. Odersky sums
it up well with:

 _This week-end 's edition is called "Scala - 1 Star - would not program
again", and it's by someone who from reading his post seems to have written
Scala all of two weeks after coming form Javascript. I think the interesting
bit is not so much that these posts are written, but that they are upvoted so
much._

I was also _very_ surprised to see such a low-quality blog post being voted up
with such enthusiasm on HN and elsewhere.

~~~
tostitos1979
"two weeks after coming from[sic] Javascript"

Is this not an ad hominem attack? The original post writer joked about Scala
syntax giving him a headache. I too felt the same way the three times I've
_briefly_ looked at Scala. I think some of the points made in that post were
valid.

~~~
jeremyjh
I'm very sure it isn't meant that way. Two weeks of exposure to Scala really
is not nearly enough time to learn the language if you haven't any previous
experience with strongly-typed functional languages. If you have deep exposure
to both Java and Haskell then perhaps you could be productive in Scala in two
weeks but even then if you wrote a rant like this your criticisms would still
likely be on shakey grounds.

------
mtrimpe
It's interesting because I found the original article quite vapid, but the
takeaway of the top two comments of the discussion quite enlightening: the
exact same set of features sound like heaven to some and hell to others.

Perhaps Scala is the Napolean Dynamite [1] of programming languages.

Personally I'm also indecisive about Scala because while I'd take Scala over
Java any day; I'm still hoping that something more elegant will become the
next 'enterprise standard' (and I'll be programming Clojure instead whenever I
get the chance.)

Scala reminds of the saying that just because the American SUV is the most
elegant solution for making a family vehicle that looks masculine; it still
doesn't mean they're not ugly.

Scala feels a bit like that SUV: Just because it's the most elegant solution
to getting something Haskell'ish shoehorned into the JVM still doesn't make
the end result elegant.

[1]
[http://www.nytimes.com/2008/11/23/magazine/23Netflix-t.html?...](http://www.nytimes.com/2008/11/23/magazine/23Netflix-t.html?pagewanted=all)

~~~
CmonDev
"something more elegant will become the next 'enterprise standard'" \- C# is
both.

~~~
mtrimpe
Assuming F# is included I actually agree with that to a large degree except
for the fact that the division between C# vs. OSS languages is more
ideological than anything else.

~~~
pjmlp
Sadly F# is taking C++'s place on Visual Studio's list of not so loved
languages.

Although many financial systems are picking it up, and a wealthy community is
building around it in the .NET world, Microsoft development tools team still
seems not sure how to steer it.

~~~
mtrimpe
Tooling-wise F# is also a difficult beast to tame. I think I even remember
watching a Simon Peyton Jones video about those exact challenges...

~~~
pjmlp
Yes there are challenges, but most of them are solvable when the willingness
to overcome them exists.

------
Sandman
One thing I noticed about Odersky is that he is very protective of his
creation (which is understandable, to some degree). He defends Scala against
any and all criticism with a fervor, and this puts him in sharp contrast with
most of other language creators who seem to be able to accept critique (or
even plain old language bashing) much more calmly. So some guy wrote a blog
post about how he doesn't like Scala, so what? People complain about Java all
the time, imagine if every time that happened, James Gosling wrote a blog post
bitching and moaning about it.

~~~
trailfox
I would argue the exact opposite. Odersky has gone to great lengths to
discourage overly defensive commentary and bashing of other languages:

[http://www.scala-lang.org/old/node/12498](http://www.scala-
lang.org/old/node/12498)

I don't think it's unreasonable to respond to a very poor quality blog post
bashing Scala since it received very widespread publicity. The interesting
story behind the story is the extreme enthusiasm with which Scala bashing
posts are upvoted on various forums. It's highly unlikely that the majority of
those voting have actually used Scala.

~~~
MetaCosm
Despite that post for tolerance of other JVM languages, I still found the
linked (original) thread a type of toxic community I haven't exactly seen
before. Peppered with great posts, but overall, disturbing.

Self-important to an extreme (We are a threat to them .. mentioned dozen+
times), often describing people who don't like Scala as either lazy or
defensive. The concept that someone could be very adept at Scala, and still
think it isn't a good language (and set of important libraries) is simply a
non-starter for them.

That type of fundamental arrogance in a community so young is bad news -- and
it appears to come right from the top.

On the upside, there was at least begrudging acknowledgement that issues
actually exist.

~~~
playing_colours
Please don't exaggerate. There are only 2 posts from the same user there where
an author mentioned laziness and self-defence as possible reasons to dislike
Scala.

Most posts are really about the existing problems and what can be done to
improve things in Scala. In general I find this conversation very constructive
and mature. I use Scala at work and see how things are gradually improving,
and this conversation makes me more assured that language/community continue
to move in that direction.

------
wiradikusuma
I use both Scala and AngularJS, and I feel like they seem to be in a similar
position in terms of acceptance (negative and positive).

The funny thing is, even for negative posts (bashing etc), I upvote them in
HN. My intention is obviously for the technology to improve, or for people to
clarify FUDs.

------
fat0wl
if you are watching, modersky, please appreciate that a big reason these
articles get upvoted is because people want to discuss Scala. many of the
comments are positive :D

i for one see value in Scala, for many of the reasons outlined here, though I
am experimenting and thinking it through for myself. the more interaction i
have with it the more i see it as a marriage of several great worlds. One
could argue that this makes for a jack-of-all-trades scenario. but let's be
honest, that is what the web world seems to be demanding.

& now, to fan the flames the tiniest bit -- when I was in the RoR ecosystem it
made me absolutely _sick_ how fervently the user-base seemed to glorify and
idolize it. Go to any random blog post on the internet that paints Rails
negatively and you will see a stream of tl;dr comments defending it that have
almost NO technical basis. just my experience anyway... and in many cases all
they seemed to be defending was syntactic sugar, a tangled web of OO, and
mediocre gems. But my real disappointment was that the culture of convention
seemed to be a cultural of programming ignorance and non-education.

This does not mean I hate RoR, since these discussions are irrelevant. But the
point is that I appreciate that Martin's views are at least rooted in
programming philosophy rather than hype-mongering for or against. Scala is a
student's language at the very least, whereas many other popular web languages
are an uninspired grouping of OO conventions. He seems to want to educate,
moreso than proselytize. Perhaps this simply makes him the devil's advocate
but I see the potential for Scala to be much more than an exercise. And if
some other JVM language gets a better foothold, I doubt Mr. Odersky will
mentally implode. I expect more Scala ecosystem advancements far into the
future.

------
octo_t
To people who say Scala has too many features, which ones would you remove?

(Please don't say + to concatenate strings, because everyone knows its
terrible, its there for Java compatibility)

~~~
lmm
I'd remove structural types. I don't see them being actually used in scala
libraries, and I think "traditional" types provide a better replacement for
most (all?) use cases.

~~~
trailfox
Removing structural typing wouldn't be an improvement to my mind. It's the
sort of thing you use maybe once a year, but when you do it's extremely useful
to have around. It's a bit like saying that removing the ternary conditional
operator in Java would make a big difference to developers' lives.

~~~
lmm
I think the kind of features you use maybe once a year are a bad thing to have
in programming languages - ease of reading is more important than ease of
writing.

~~~
trailfox
I should also point out that it's a feature which I don't believe detracts
from readability. It's pretty clear from looking at code which uses ST what it
does. There are examples in this thread.

It's a feature that you will use _directly_ maybe once a year when adding it
to a library, but I then use that library (and indirectly that feature)
virtually every day. YMMV but we've found it very useful.

------
pron
As someone who "bashed" Scala numerous times in HN comments, let me explain
why, but first, a bit about my background: Nowadays I program mostly in Java
and some Clojure; before that, I developed in C and C++ for many years. I like
both the OO and the FP approaches, and I am all in favor of incorporating FP
concepts into OO languages (Java 8 lambdas) and vice versa (Clojure
protocols).

I think that as a research language Scala is very important. It meshes
features found in many different languages (OO types, algebraic types, duck-
typing, macros) into one compiler, and so teaches us a lot about how these
features can interoperate.

But Scala wishes to be a practical language as well. As such, I think it is an
exceptionally badly-designed language (which does not, in itself, merits
bashing) that masquerades, or claims to be, a well designed one, and herein
lies the problem.

As Rich Hickey so eloquently puts it in one of his talks[1], a programming
language is like a musical instrument. Every instrument has properties that
introduce constraints. A trumpet can only play one note at a time, while a
piano has very limited sustain. These constraints do not limit the artistic
expression of the instrument – they assist it. An instrument with no
constraints is a "choose-a-phone", and as Rich Hickey says, no one wants to
play a choose-a-phone. That is not to say that a rich piece of music cannot be
composed for a piano-and-trumpet ensemble. In fact, the JVM, which Scala
targets, is the perfect language-ensemble tool, as it offers a harmonic
interoperation of different languages of different kinds.

Scala is the ultimate choose-a-phone language, with little or no constraints.
When it removed the constraints by mixing all these disparate features, it
lost most of their underlying justifications. It adopted JavaScript's duck-
types but lost the simplicity of the language; it adopted Haskell's algebraic
types, but lost the control over side-effects; it adopted Java's OO types, but
again, lost their static-type simplicity. But JavaScript uses duck typing
_because_ it can keep the language itself dead-simple and easy; Haskell uses
those sometimes-hard-to-grasp algebraic types _because_ they offer safety and
carefully controlled side-effects; Java has a basic OO type system _because_
it offers some safety while keeping the language relatively simple. Scala
takes these features but drops their reasoning; in the process it lost its
coherence. So the challenge of programming Scala turns from the challenge of
simply expressing your artistic ideas with your chosen instrument into keeping
yourself in line without those helpful constraints. It makes playing a
harmonious melody difficult.

Scala masquerades as a well-designed language because it includes all of these
modern, cool, features. Each of these features is well designed. But putting
all of them together is the opposite of good design. The whole, in this case,
is much less than the sum of its parts.

All this is not purely philosophical. Languages like Clojure and Erlang tell
the programmer "this is how you should write software", and if you need to do
something else, you should integrate Java or C code. Scala, on the other hand,
offers little guidance. Immutable and mutable variables are just as easy to
declare; the "expression problem" is sometimes solved using OO and sometimes
FP. As a research language - that's great; as a practical language, it can be
destructive.

It is also wasted effort. While it is certainly true that sometimes "named
types" are better while other times duck-typing is more convenient, or that
sometimes you want simple mutability and sometimes you don't, or that
sometimes pattern matching is better than polymorphism and sometimes the other
way around, in 99% of the cases, either of these approaches works well. Good,
working, efficient, complex software has been written in Java, Haskell,
JavaScript and Lisp. Combining all those features into one language creates
big, largely unnecessary, overlaps in functionality that mostly cause
confusion. This wasted effort is not just a waste; it is downright harmful,
because Scala has become a very complex language. So complex, in fact, that no
one but veteran Scala experts can understand how Scala's linked-list is
implemented.

It is also unnecessary because, as I've said, the JVM is a multi-paradigm
environment. If one paradigm is better than another for different parts of
your software, you can write parts of it in Java, others in Clojure, others
still in Erjang, and others in Frege. Even then you'll find that one, simple,
language is perfect for 98% of your project, while another simple language is
the best fit for the remaining 2%.

I think Scala's designers are stuck in their PL-research point of view. It is
immediately apparent that Scala is not a language that grew from developers'
needs and problems (like Clojure and Erlang), but from a PL experiment. Some
years ago it might have been OK to overlook much of Scala's complexity and use
it as "a better Java". Now, Scala has become ever more complex, and at the
same time, better designed practical languages for the JVM have shown up.
Given the wide choice, I think Scala is now a particularly bad option for a
practical JVM language, especially if you're working in a large team, as every
complicating language feature causes compounded damage as the number of
developers on your team grows.

[1]: [http://www.infoq.com/presentations/Design-Composition-
Perfor...](http://www.infoq.com/presentations/Design-Composition-Performance)

~~~
ssmoot
You keep posting this argument.

As a practicing Scala user, I think it's pretty unfounded.

You could make the same "3 unnecessary type systems" argument about Ruby with
attr_ methods, duck-typing, and classes. But I've _never_ seen that. Maybe
that's because if you're a fan of Ruby, the fact that it's Strongly Typed is
pretty incidental. Things have Types, but if it's not enforced in any
_practical_ way, do you care? Pretty much not. It's a dead giveaway when
people misunderstand what "expressiveness" means in the context of a type-
system and go on to talk about how expressive Ruby is. Next to VBScript and
JavaScript it's the least expressive language I know.

Scala isn't Java++ for me. It's Ruby++.

So maybe it's a case of differing backgrounds and expectations. I don't know
Haskell. I went from VBScript, to JScript, to c#, to Ruby, to a smattering of
Java, to Scala.

So from my perspective this argument is as Ivory Tower as it gets (which is a
bit ironic right?). It's like suggesting Ruby needs to remove attr_ methods,
or Struct. It's like suggesting that all you need is eigenclasses and you
shouldn't have any label following the "class" keyword. It's like suggesting
Ruby must drop respond_to.

And I have to wonder: What's the point? Would it make Ruby a better language?
Is it going to make Scala a better language? No. Taking away my ability to
emulate c#'s using() method with Structural Typing is not a step forwards, and
it's most certainly not a case of "good design".

So eliminate case-classes? Why? Limit yourself to bolting on properties,
equality, hash codes, etc ad-hoc? What's the point of any of that? It's
definitely a step backwards in ease-of-use.

This is the very opposite of a practical or pragmatic critique. There are
problems with Scala sure. That it simplifies a lot of boiler-plate (and really
enables the FP/OO bridge) with a keyword (case class) and syntax (structural
typing) isn't one of them from my perspective.

~~~
pron
Ruby (in which I've written no more than maybe 100 LOC) is great for what it
does, but no one in their right mind is going to build a 10 MLOC aircraft-
carrier control software in Ruby. Ruby's main goal is fast prototyping and fun
initial development, a goal which it accomplishes beautifully. It is not a
language for big engineering undertakings. But Scala tries to compete with
Java, and you _would_ write a 10 MLOC aircraft-carrier control software in
Java. Once you're dealing with big engineering efforts, out-of-the-box ease-
of-use is no longer your main concern; it's not even among the top five
concerns, but complexity certainly is.

I don't have a problem with Scala as a Ruby replacement. I do have a problem
with it as a Java replacement.

~~~
dragonwriter
> Once you're dealing with big engineering efforts, out-of-the-box ease-of-use
> is no longer your main concern; it's not even among the top five concerns,
> but complexity certainly is.

If you are writing massive software to handle comprehensive control for an
aircraft carrier, you'd _better_ be writing it in loosely-coupled components
with well-defined interfaces, or its going to be a maintainability nightmare
no matter the language features.

If you are doing that, Scala's flexibility lets you, internal to each
component, take the approach most suitable for the team responsible for that
component addressing that components requirements.

I can see where Scala's flexibility could make a bad situation worse if you
are writing an enormous piece of software but not doing it in loosely coupled
components but instead doing a tightly coupled nightmare -- the OO equivalent
of spaghetti code -- but, even though it might be _less_ of a disaster, that's
still going to be disaster in Java or C#, too.

------
ngcazz
Say what you want about Scala, this kind of modesty and openness to criticism
is quite uncommon in IT! Maybe it's the academic background...

------
Estragon
From the thread in the OP:

    
    
      ...to exploit the real power and appreciate design choices takes months if not years...
    

It sounds like the benefits of Scala are very subtle, and I would love to read
an informative overview of them and why they are hard to master.

------
jheriko
i have to admit i do mildly write it off as yet another hipster language we
don't want or need... but i do have a curiosity to see what all the fuss is
about.

i can imagine a fair amount of negativity coming from app and system
developers thinking "oh god, not yet another story about yet another hipster
web dev language we don't need... yet again! when will web developers ever
learn! when will i get a language /i/ want..."

i'm sure it is great for some domain, but i've yet to really play with it or
find myself wanting it somewhere.

to be fair, most of my language excursions away from c and c++ are from either
pure curiosity or a platform holder ramming it down my throat.

------
eklavya
I don't use LISP languages, I haven't tried them mostly because I really don't
like "()", but I do know they are loved by those who use them. They must be
good. People say that you get used to it in a while.

Now what I won't do is try to apply all the patterns I have learned over the
time and try to force it on a LISP language and then say that it is shitty
because x. I would rather take some time to learn the LISP way of doing things
and be more enlightened for having done so.

Of course Scala is heavy on types. It is advertised as a feature! why the
surprise? Why won't you come along with us and try to do things our way once
and see if you like it?

~~~
edem
Because that way is littered with rotting corpses ravaged by baroque syntax
monsters.

------
oscargrouch
>For me the main reason is that programming languages are incredibly tribal
and Scala has no traditional community

This is the pure essence, of why people here at HN love or hate some
language/technology

As a experiment, try to talk badly about javascript or anything from apple

The community here are completely biased, and its all about hypes.. any
technology that require more effort and dont make the guy looks like a genius
in 5 minutes of programming is not worth it in their view..

its not a problem with the language, its a problem with the community.. Its
the generation of "genius: cooked in 15 minutes"

nevermind the bollocks

~~~
omni
Every single post about JavaScript is filled with people in the comments
talking about how much they dislike JavaScript. Not sure that's a great
example.

~~~
oscargrouch
Yes, but that is after 2 or 3 post javascript related (javascript + javascript
libraries) being upvoted everyday

My point is, there is a cult.. and thats what make the rating mechanism so
unfair with other technologies that are not the mainstream ones

I saw it happening with Java, now its Javascript.. and soon will(probably) be
Go

yet, they are all the same paradigm of C.. some sintax sugar here, some FP
there.. yet.. same paradigm.. nothing that would make you create something
never seen before in other language.. just more noise and vanity

------
buster
TBH, i don't see so many Scala rants on the HN frontpage (surely not every
week). It's kind of amazing how people take some little blog rant of some
random stranger so personal and a whole community debates about it..

------
static_typed
Well, Martin should be happy Scala is getting discussed, even if he doesn't
agree all that is being said. There are plenty of new and old languages that
never get a mention on HN, let alone grace the front page.

That said, he should probably not take any criticism personally. They are
discussing Scala the language, not Martin the creator of that language.

~~~
frowaway001
There was at least one person which did not only attack and insult him, but
went straight from HN to the mailing list to do so.

I don't think this makes HN look good in any way.

