4 ms·
I think you've nailed it perfectly that Scala imposes as few constraints as possible. This leads to an oft-repeated criticism that since there are a dozen ways
by aklein 13y ago
I think you've nailed it perfectly that Scala imposes as few constraints as possible. This leads to an oft-repeated criticism that since there are a dozen ways to accomplish the same thing, it is hard for a newcomer to be productive quickly or to know what the "best-practice" is. However, this same flexibility allows an expert user to make specific trade-offs. In coding Scala full-time for a year, and writing an open source library [1], I never found myself saying that "I wish Scala had feature X"; but more importantly, I certainly never said "I wish Scala did NOT have feature X." Indeed, it seemed to address so many deep problems with Java. One loud complaint is lack of reified generics on the JVM, but this is easily addressed in Scala using TypeTags (2.10+).
I like your musical instrument analogy, and to steal it, I would say that Scala allows you to be the composer rather than the musician. To be an effective composer, you need to know the qualities of all the musical instruments so they can work together harmoniously. You can write a beautiful symphony, or you can create horrible noise. But the power to do so lies with the developer/composer.
That said, arming your large development team of average developers with such powers might indeed be asking for trouble. That's why Rod Johnson, in his recent Scala Days address [2], challenged the Scala community to address this problem if Scala is to be the "next Java".
[1] http://saddle.github.io/ http://saddle.github.io/
[2] http://www.youtube.com/watch?v=DBu6zmrZ_50 http://www.youtube.com/watch?v=DBu6zmrZ_50
- pron 13y agoWith regards to the future of Scala, the problem is that Scala isn't even the incumbent of being "the next Java". Java (8) seems to be the next Java. Scala is already quite old to be so far behind, and there are several alternatives to Scala that don't suffer from Scala's shortcomings. My take on Scala is that it's a very interesting language that has taught us a lot; time and time again, when faced with the choice, it has taken the research-oriented route rather than the developer-oriented route, to its detriment; while gaining strides, it has failed to capture the hearts and minds of enough developers; there are languages that have learned from Scala's mistakes, are more developer oriented, and are more suited for widespread adoption. As to the few constraints, keep in mind that my point is that those constraints are or at least directly lead to benefits. So few constraints mean few of the benefits. Scala mostly enjoys the "few lines of code" benefit that Ruby developers like, but not the more important benefits of a solid, well-considered, easy-to-maintain language.