Google Groupes

Re: Another Scala rant on HN


David Riccitelli 2 déc. 2013 06:52
Envoyé au groupe : scala-debate
Hello,

First of all I would like to thank Martin Odersky and all the people that are contributing everyday to Scala and its ecosystem, like Typesafe, Mathias Doenitz, Endre Sándor Varga, the IntelliJ team their IDE and the sbt autoimport plugin by Pavel Fatin... (these are just a few of the names I crossed in my journey with Scala).

I started being "contaminated" by Scala about a year ago and I was immediately attracted by it, therefore spending plenty of my spare time to study and make practice with it, following the Coursera lessons, reading the few blogs around, watching recorded sessions on YT, participating to live screencasts or meetups.

I felt that Scala, bridging the worlds of OOP and FP, could and can solve some of the issues I lived while coordinating and participating in the development of complex systems, both from the stability and scalability point of view. The development paradigms expressed by Akka and Spray would help write decoupled code which is clean, stable, performant and scalable.

I was also impressed to see Spray climbing the score of the TechEmpower framework analysis (http://www.techempower.com/benchmarks/) and Scala being in the Adopt list of Radar (http://www.thoughtworks.com/radar).

I had and I still have the best of the intentions when I read blog posts, manuals, code samples and every word Martin writes on the Web (Martin, you have all of my admiration for being present and available to everyone, on StackOverflow, on Hacker News, on personal blog posts, ...) to grasp what's the right state of mind of a 'Scala' adopter.

I also published my own open source contributions (https://github.com/insideout10/open-street-map-importer - had no knowledge of Cake at the time) and looked for feedback from the community (https://twitter.com/ziodave/status/359216863005663232).

Indeed, reading the post by Giles Alexander just happened when I was getting somewhat frustrated and I am not sure what is the cause of this frustration. All I know is that I need to solve my frustration and either reach a new level with Scala (and related libraries) or take some distance (at least for a while).

I'd like therefore to provide my own (positive) feedback, probably you could imagine of me as an average developer wishing to take a step forward, available to spend his own energies and time, but loosing confidence about being "the right guy" for Scala.

Of the points you cited, I think this is one of the most important:
Work on giving more guidance what good Scala code should look like. For instance, develop a detailed, type based lint tool with configurable complexity. Or think about what useful design patterns in Scala are.

Things like your post about the Scala levels, http://www.scala-lang.org/old/node/8610, also feel very positive, providing a clear roadmap in progressing Scala among its vast amount of features.

When people talk about Scala, they don't talk only about the language itself but about its entire ecosytem (Akka, Spray, Slick, ...): I think that some effort must be put also in libraries design, development and publication. Developers (in the A level) must be able to use libraries and therefore these libraries should use understandable interfaces, maybe agree to some common guidelines (or at least clear guidelines consumers understand). A positive example is Akka actors, the ! and ? methods are straight and clear, like speech. Some more effort is indeed required with database frameworks where equality and inequality are getting replaced by === and =!= (IMHO this creates confusion and errors).

The API documentation should also be readable by level-A developers, maybe providing simplified views and advanced views according to the audience would help.

Martin, don't feel discomforted by the posts being written about Scala: I remember participating many years ago at an OSCON conference which was basically split in two non-osmotic worlds: the Java developers and Ruby/Rails developers. The Java community was seen as a monolithic corpus marching straight on its path. I believe Scala managed to crack this corpus like never before and is spreading fast. People are interrogating themselves about which direction to take.

All the best,
David


On Monday, December 2, 2013 11:32:15 AM UTC+2, Martin wrote:
Seems hardly a weekend goes by these days without another Scala rant that makes the Hacker news frontpage. 


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. 

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? 

For me the main reason is that programming languages are incredibly tribal and Scala has no traditional community - the functional/object-oriented programming "tribe" is still in its formation state. People are coming to Scala from all sorts of communities: Java, Ruby, Haskell, you name it. 

Scala's generality makes it both a threat because it *can* do tasks that are traditionally the domain of these other communities and an easy target because every community finds something that is foreign from their point of view. Java people will bitch about how academic FP is, JS and Ruby people complain about the types. Haskell people complain about the objects and that the types are not strong enough. And even though those communities would normally never mix, they find common ground in the opinion that Scala is a horrible language. 

What can we do about it? Not that much I fear, but there are some bits that are useful nevertheless.

 - Work on the things people tend complain about, as long as this makes sense. 

     + we have fixed the IDEs (thank you IntelliJ and Eclipse teams!) so this
        is no longer that much of an issue.
     + we are working on compile times and expect to have significant progress to announce for 2.11
     + we are working on making binary compatibility less of a problem
     + we should do something about operators. I like James Ward's idea to mandate an alphabetic alias for every operator - at least people would know how to pronounce them then.

 - Work out the simple parts of Scala. Show that Scala hangs together rather well, that it has a fairly modest footprint, and that it is definitely not twice the complexity of C++ as one poster on the thread claimed.

 - Work more on forming the community. Make it clear that Scala is a third way, it wants to be neither a Java with semicolons nor a Haskell on the JVM. 

 - Work on giving more guidance what good Scala code should look like. For instance, develop a detailed, type based lint tool with configurable complexity. Or think about what useful design patterns in Scala are.

 - Last, but not least, engage in these discussions on HN and elsewhere in a polite but firm way. State where your experience differs from the other posters. When somebody complains about long compile times, state that incremental compilation works well for you (if it does, that is, it certainly works well for me by now!). But don't attack the other poster even if you find their arguments lacking, that usually just leads to a mud-fight.

If you think of other constructive things we could do I would be interested in reading them!

[Follow-ups to scala-debate, please]

Cheers

 - Martin