Kenneth McDonald posted the following question about Scala’s future in the Scala mailing list:
I thought it would be interesting to find out people’s predictions for how much of the Java market Scala will eventually penetrate. It’s nice to see Scala doing reasonably well so far, so now’s your chance to make a prediction on the future of Scala:
a) Scala will remain a niche language, competing with Groovy, JRuby, etc.
b) Scala will become the dominant “second” language for the JVM.
c) Scala will actually become big enough to compete with Java in many respects.If none of these fit your outlook, feel free to make up your own answer.
In my opinion, the answer will be A (niche) or B (second language), depending on the community’s ability to:
- Promote Scala (and Liftweb);
- Simplify the process of switching from Java (e.g., by providing familiar tools) as much as possible;
- Provide worthy reasons to switch (e.g., killer apps). People rarely go to the trouble of switching just because something is “nicer”, even if in reality it causes one to write more robust code that takes advantage of higher order abstractions and a “safe and coherent” type system. Liftweb and concurrency through the Actor model / Akka are definitely two examples of a step in the right direction, as they do a particularly good job of solving a specific problem and showcase the value of adopting Scala as a user, as well as a tool to implement libraries and reusable components.
The software development community is embracing dynamically typed languages like Python and Ruby, as well as functional programming. Languages like Python and Ruby simplify the development process for a beginner. They are easy to read, learn and use. Their adoption is therefore growing quickly. They also offer practical solutions to web development needs through frameworks like Rails and Django.
The paradigm shift to functional programming is much slower however. Functional programming done a la Scala, is undoubtedly advantageous for the competent software engineer, but moving from Java to Scala requires significant commitment and a higher degree of understanding about how to program, in my opinion. Are Java developers up to this? Some of them are, but I doubt that a majority of them would be. It should be noted that Scala has the potential to also attract developers who don’t program in Java, but rather come from a different background, such as the aforementioned Python and Ruby. These people may look into Scala as a more functional-oriented, robust and faster alternative.
This, coupled with the current, limited popularity of Scala, leads me to believe that option C (let’s say ~50% marketshare) is not a realistic option for the foreseeable future. We are entering the long tail period of programming, where many lesser known languages will start gaining some traction. Achieving a “second language” status is still an ambitious and worthy goal. There are many formidable opponents aiming for that, including JRuby, Jython, Groovy, and Clojure, and the rewards for doing so would be substantial for everyone involved.
The real question is not how far Scala is capable of going in terms of adoption, but rather what can be done to ensure that it will achieve widespread acceptance, however that may be defined. Paying close attention to the success stories of Ruby and Python may give the community some insight as to what should be done. To a minor extent, fellow functional programming languages like Erlang and Haskell are doing a fine job marketing-wise and are gaining traction. As of 3.30 pm today, there are 147 members in the irc channel for Scala, and 576 for Haskell. This is not to say that one is better than the other, or even that Haskell is more popular than Scala in general, but rather that there may be something to learn from a “similar” language, that poses compatible challenges for those who intend to approach it.
Being based on the JVM, well integrated with Java, and to a certain extent being Java-like, are all major advantages that may help Scala’s ability to gain major popularity. And being ingrained in the Java world, will affect the way Scala’s image and the ways it can be promoted as well. Whereas Ruby has a somewhat anti-corporate spirit and image, and is tough to sell to the Enterprise world, Scala doesn’t face these challenges. As such it may appeal to a much larger category of developers and companies. However, a lot of work will be required to reach that tipping point. Scala is already an excellent language, as far as I can see, but it will be a combination of technical efforts and marketing to really decide Scala’s popularity.
Get more stuff like this
Subscribe to my mailing list to receive similar updates about programming.
Thank you for subscribing. Please check your email to confirm your subscription.
Something went wrong.
It would be nice if we just used the right tools for the right jobs, without getting into religious arguments about which tools are awesome and which ones are stupid.
Having said that, who has the time to get their work done AND to learn all the trendy new languages, frameworks, middleware, plug-ins, version control web repositories, project management web apps, and libraries that pop up every month? It can be suffocating and completely kill productivity.
The sad thing is that Java will die this way – because people think that Scala JRruby Groovy etc.. are the future, but noone wants to use Java anymore?
As a language Scala beats Java on almost every single feature. Only exception is the removal of exception specifications which I find to be a big mistake – but I’m aware that I’m in the minority in that regard.
However, the tool support is really poor compared to Java. I find that to be a major hindrance. This is quite disappointing considering that Scala isn’t exactly brand new anymore. Maybe some commitment from the core developers of Eclipse and NetBeans is needed.
Another issue is library support. It seems like the people behind Scala is relying too much on the fact that you can use any Java library you wish. While this can certainly help when moving from Java, it is not enough if you are coming from languages like Ruby and Python which both have a huge number of excellent libraries that are written in the same philosophy as the host language.
Killer-apps, killer-libraries, and killer-tools. Those are the things Scala need to become truly successful.
It needs “Killer-apps, killer-libraries, and killer-tools. Those are the things Scala need to become truly successful.”
That’s a good point
Grails is the killer app for Groovy
Groovy inventor James Strachan: “I can honestly say if someone had shown me the Programming Scala book by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I’d probably have never created Groovy.”
“…make Scala a very interesting language, and worth being heralded as the current heir apparent to the Java throne by one of JRuby’s creator, Charles Nutter ”
would suggest at least B and very possibly C
I am a Ruby/Rails guy and recently got Stu’s book on clojure. I am surprised that so far clojure has not featured prominently in the discussion.
I would like to know what people think of clojure compared to Scala.
Note: I know nothing about Scala.
“The sad thing is that Java will die this way – because people think that Scala JRruby Groovy etc.. are the future, but noone wants to use Java anymore?”
Why is that sad? No one wants to program in COBOL anymore and I’m not the least bit sad about this.
No language has the same level of tool support as Java has – scala IDEs are just not there.
IMHO groovy will get one more chance this fall when springsource guys release new version of groovy eclipse ide.
Scala has so many new or obscure features – thik of generics. I don’t see many developers using generics to it’s full potential. Do you think those same people would understand all of the Scala features?
Another problem that Scala, or Groovy or Jruby confront is the fact that Java developers mostly write business applications for banks, goverments or other conservative institutions. Those clients do not like to mix environments. They do not like excitement unless huge cost savings is involved. They like predictability and support.
So, if you’re unable to use your favorite language during 8 (or more) hours of your work day when will you use it? On a pet open source project?
Unfortunately most of the Java developers piggyback on open source projects and they don’t contribute back to the community as much as they could (think of it: there is eclipse as IDE, hibernate as ORM tool, grails as alternative to rails, all those apache projects, codehaus). Almost all of the libraries that we use today are open source projects that need care and contributions. And yet, most of us don’t give back nearly as much as we take.
Back to the point: majority of Java developers hardly ever write code outside officially supported language on Java platform. That’s the primary reason none of the other languages will become new JVM language of choice.
If groovy gets decent and free of charge tool support, this fall I predict it could change the balance. I already see developers looking at grails as a solution for writing dirty cheap apps. With better tool support I bet they would use groovy as much as they use Java today.
What scala really needs is killer-ide support!
I think Scala is the only current language likely to take the throne from Java.
But I also believe that it’s going to take a long time to get there. Scala presents an extremely powerful language and type system that’s extremely scary for anyone who first looks at it. That barrier to entry can’t be understated. It may improve over time, but Scala, at first glance, is terrifyingly complex (even if over time you learn it’s not as bad as you though). Presentation matters.
Ultimately I think the Java throne could be taken easily by a language that simply took Java and removed all the ceremony without losing any of the “bare metal” feel and high performance. Duby is one attempt to do that, though it diverges from Java syntax quite a bit. If someone were to take javac and add: local type inference; closure-like syntax for anon classes; more literals for regexp, lists, and maps; extension methods and delegates a la C#; “dynamic” calls using reflection or invokedynamic; and no runtime library “ball and chain”…you’d have a Java killer right there.
@Charles: I agree with you. A “cleaned up”, more flexible Java, would be much more inviting to the average Java programmer.
I think Scala needs more time until it will be largely adopted by users. I think one of it’s disadvantages is that you can, very quickly, produce unreadable code. Also, IDE support is less than average.
Scala runs on the Java platform, so I have no beef against it, unlike the cultists using RoR, and in fact plan on trying Scala out. I wish it all the best and hopefully the JVM continues to provide a home for more JavaPlatform-based languages which can integrate seamlessly with Java language libraries and programs (and which in Scala’s case I think actually compiles to Java bytecode). To me Scala IS a component of Java (the platform and maybe even the language)
Saying that, I do not believe it will displace Java anytime soon. In fact, I’ve always predicted none of the “hyped” languages like Ruby on Rails, etc will ever displace Java. The only real competitor to Java is from the Microsoft technologies.
I mostly agree with what Charles Oliver Nutter describes as the ideal alternate JVM language (the “Java killer”). For me this language would be very much like Groovy but it would be statically typed. Thus, old style Java code would compile but type inference and other such technique would be used to achieve something very close to what is done with a dynamic language (Scala does that).
Why statically typed ? Several reasons:
1) Performance of course. For the kind of application I work on (no DB and not much Network communication but lots of numerical algo) I could accept a 10 to 15% loss of performance. Anything beyond that would hurt and make adoption difficult. Right now, dynamic languages on the JVM are much slower than that.
2) Better error checking at compile time (free unit tests). It is very difficult to do “trial and error” programming in Java. I’m not a bad programmer but it is just amazing the kind of nonsense that the Groovy compiler let me do to then blowup at runtime. I just don’t see how we could use a language as permissive as this with all levels of programmers at work (even with good unit tests).
Don’t get me wrong. I think that for some type of development (even mainstream deliverables) dynamic languages are great. I might end up using them for some components. But in my case not for the core main application.
For me even a “Java killer” as described above would not be totally satisfactory. That’s why I’m seriously looking at Scala.
The bottom line is that maybe in the future there will never be a language on the JVM as dominant as Java is right now. I think we will see different languages used for different type of applications.
i agreed to a comment ‘right tool for the right job’. rather than being evangelical about X,Y,X language.. whatever i bought a Programming in Scala book so i am on it.
I think Charles Nutter said it best. I dont think Scala will dethrone Java, because there are a millions of Java developers out there who dont care about “a better language”. As sad as it is, they just want to get their job done and “if Java didnt change at all, that would be perfectly fine for these developers” (quote from Neal Gafter from a talk about VB getting closures before Java).
There is a massive amount of people that does not care about any alternatives on the JVM. Unless the tool support is equally great and no implications on build-system and deployment are necessary, there wont be a java-killer for them.
The sad thing is, there is a real business value in control abstractions and higher order functions, because it can lead to more robust code especially when dealing with closeable resources or whenever a deferred execution is desired.
Corporates may not move to Scala (or Clojure) anytime soon, but that’ll be their loss. It’ll just make it easier for smaller, smarter outfits to compete with them.
I do admit that Scala is a very interesting experiment. However I would suggest “A” without a single chance for B, but I hope Scala will be used by more pragmatic language designers as an inspiration.
To be considered as a true Java competitor Scala looks too flexible in its syntax and the mix of OO and functional style makes the situation even worse.
I cannot imagine a really big enterprise application containing millions lines of code written in Scala. Such an applications use to evolve for years with many developers of very different skills involved. In this situation the excessive flexibility should be considered as a huge disadvantage.
Just my opinion. Will be glad to be wrong.
My biggest worry is binary compatibility. Program compiled with 2.7 does not work on 2.8. In Java I can still work with 10 years old library (log4j for example).
Also to gain significant market share from Java it must be far better than Java. Now it just adds some suggar, it helps but is not 10x better.
I am using Scala for my personal projects, but would not recommend it as Java replacement to my boss.
So how close does Fan (http://www.fandev.org/) come to meeting Charles’ goals? My impression is that it comes pretty close…
@Bubak
Have you read all 700+ pages of Odersky, Spoon and Venners “Programming in Scala” and concluded that “this is just some sugar” on top of java ?
That is truly amazing!
@Igor
Arguing that one should use weaker tools for building large things seems odd. If your developers consistently hurt themselves with java, then sure – they will hurt themselves more with scala. But if they do great things, they will do greater things with scala.
i think it’s always misleading when power users/lang designers (who go deep when looking at a language) try to predict what a “normal developer” needs to understand in order to get stuff done in a given language.
If we just take java, how many developers do you know who learned the language like, ok let’s study the whole type system first?
my guess is that most developers learn a language differently. They learn how to use simple data structures, how to read from a file, how to iterate through collections, what the standard control structures are, how to handle exceptions, how inheritance and concurrency work on a basic level.
And in these areas scala is in fact simpler than java.
Scala is nicer and “less verbose” than Java but unfortunately this does not translate to fewer keystrokes and mouseclicks. In an IDE like Eclipse, a lot of the time-saving IDE features work only in Java.