The last two days a quote of James Gosling from this talk gets retweeted over and over again:
James Gosling on #Scala: “The most depressing thing on scala is […] most people pick up scala as #java with more concise syntax”
I kind of disagree with James statement and therefore replied with:
What’s wrong with picking up #scala as #java with concise syntax? Most people picked up java as #vb with oo or #c++ with garbage collection
And I even went so far to claim:
Although I like the functional stuff + the strong type system. I think it’s doing scala a bad service to emphasize it.
Which in turn triggered Mario Gleichmann to ask for an explanation.
So here it is, because there is no way I gonna fit this into 140 characters.
Everybody involved in this discussion including myself would like Scala to gain more traction. Maybe even become the next big language. Probably most of the people using Scala right now love its functional features and its type system. I can certainly see someone like James Gosling who did tons of Lisp coding feel sorrow when he sees people using Scala just as they would use Java.
BUT there aren’t only friends of Scala out there. Many people out there consider Scala a complicated (or complex or difficult) language. And in SOME sense they are right!
It is cool you can prove the Scala type system is turing complete. I’m sure Monads are cool and useful thing, but I haven’t grasped them, and I know many people that will never even try to understand them. The map implementation of Scala is so cooool, but its type declaration looks really scary for people that don’t understand the type definition of Enums in Java.
All this stuff is cool for people who like to sit in the front row. But very few people actually do like that. Most developers just want to get their work done. And all these confusing (powerful) features won’t convince them to switch to Scala. I actually think it scares people away from the language.
Really simple stuff is much more useful in selling Scala (or any language):
- Case Classes are so much easier and shorter to read and write the Java Beans
- Exception Handling is way more concise, especially when you want to handle various exceptions in the same way
- Concise syntax for collection literals
- With ScalaTest there is a really nice extremely flexible Testing Framework that allows for a wide array of testing styles
- The subset of Scala that you need to replace Java is easy and possibly even simpler then Java itself.
- Maybe some processing of Collections (without emphasizing the different paradigm so much)
- …
Once people feel more secure with Scala they may and many will explore the more interesting and challenging parts of the language.
Having said all that I will still enjoy topics that make my brain hurt. But I will focus more on simple everyday stuff when writing about Scala, because I think we need more of that and because I’m just to stupid to really grasp the more powerful stuff. BTW: If anybody in my proximity would like to test her monad explaining skills … I’m a willing test subject.
I am a fan of Scala overall. However, I do have two real issues with it.
Syntax. Too much of it is optional. It makes for very difficult reading of code. Having a regular consistent syntax is very powerful. If its verbose then its verbose. At least there is not mistaking what the code is doing.
Scala libraries are a mess. Its baffling to look at the ScalaDoc for something like List, which should be simple. And then discover it extends 30 other classes and has 50 traits. Odersky and co. need to clean this up ASAP. Its really ugly.
@Don, that’s already fixed at http://www.scala-lang.org/docu/files/collections-api
I find Scala much better than Java and think the powerful features help to avoid workarounds like XML config, annotations, reflection, expression languages and so on.
But Scala looks somewhat strange at a closer look. Generics with [+A <: B] or methods like ":\" are hard to read.
unfortunately Scala does not allow variable names like
🙂
😉
😛
😀
etc..
perhaps this was intentional.
Yes, this quote have been retweeted over and over, and I felt exactly the same as you.
If Scala is used only as a better Java, it is already a huge improvement! It is more concise while remaining clear, it is elegant by its defaults. BTW, you can add named parameters and defaults to the nice features that can speak to a Java developer (ie. not too alien unlike a curry of monoids… ;-))
And most people will have the curiosity to go a little further once they got the bases. Starting to go functional (a bit) because of the nice facilities of the collections, and using functions instead of anonymous classes. Starting to appreciate pattern matching and XML processing. And so on.
“If anybody in my proximity would like to test her monad explaining skills … I’m a willing test subject.”
Daniel Spiewak has an excellent explanation of monads in his codecommit-blog:
http://www.codecommit.com/blog/ruby/monads-are-not-metaphors
At anon:
“unfortunately Scala does not allow variable names like…”
Seems you have missed the following Scala News:
http://www.scala-lang.org/node/5818