Can anyone explain in less than ten words why one should learn Scala in 2013?
My take on "Should I care about Scala?" question: - If you're average or below average developer: the language does not matter. Focus on algorithms and read other people's code a lot. - If you are using anything other than Java: consider testing Scala ( * ). You might learn great new ways of writing code, especially if you never used Functional Programming before. - If you're above average developer programming in Ja…
Why Learn Scala in 2013?
51–60 of 75 posts
Re: Why Learn Scala in 2013?
#52Earlier quoted context omitted.
There's no limitation: you can use any 3rd party Java library from Scala. We do it in production for years, works perfectly. It's true that Scala DSL is scary. As far I know soon (version 2.10?) you will have to add a compiler flag to enable some scary stuff. They are useful for library developers, but not too great for everyday apps. Also you don't have to use the functional part. I saw plenty of code that looked li…
You're right. But functional adds a whole new layer of "safety". The functional developer will think, "My code is functional, share nothing, messaging passing goodness. I'm fine." As but some new developer, keen on Scala, but not thinking about the older 3rd parties, adds a call from his functional goodness to the non safe, side effecting code. This will introduce a subtle, hard to trace bug. As a result, I'm not a b…
The fact is Java interop is a fundamental feature providing great pragmatic utility as well as an absolute prerequisite for any kind of adoption of these languages. It's basically the opposite of "hype."
Re: Why Learn Scala in 2013?
#53Earlier quoted context omitted.
It's too bad sbt isn't actually simple and is generally a disaster. I did scala in IntelliJ. The lack of tooling reduces the value a lot. I almost prefer plain java over the sheer simplicity it has comparatively...
Why do you feel that sbt isn't simple/a disaster? I actually think it is the nicest of the build tools on JVM. I can set up basic projects with no configuration. Also, its triggered build feature[1] combined with its interactive console is a killer feature set that I think all build tools should have. [1] http://www.scala-sbt.org/release/docs/Howto/triggered.html
Re: Why Learn Scala in 2013?
#54Earlier quoted context omitted.
My take on "Should I care about Scala?" question: - If you're average or below average developer: the language does not matter. Focus on algorithms and read other people's code a lot. - If you are using anything other than Java: consider testing Scala ( * ). You might learn great new ways of writing code, especially if you never used Functional Programming before. - If you're above average developer programming in Ja…
So my colleage recommended we look into spark, which looks pretty neat, but said a caveat would be that we would need to learn scala. My first impression of your bare minimum is "holy crap that's a lot of boilerplate for a bare minimum project". While I expected there to be some code necessary to get thing up and running, my mind spun at that 400loc build script. What the heck is that for if you are not actually doin…
It's just for convenience: it will automatically install Java, Scala and dependencies. Run it and you don't have to hunt down anything from the web.
If you have SBT already installed (with homebrew, MSI, apt-get etc), you don't need that file at all.
Main.scala is a "println", Build.scala sets some compiler flags and project name - this is all.
About "Unit": Scala is strongly typed. In exchange you will not have run-time type errors and also you don't need type checking unit tests.
Re: Why Learn Scala in 2013?
#55Earlier quoted context omitted.
So my colleage recommended we look into spark, which looks pretty neat, but said a caveat would be that we would need to learn scala. My first impression of your bare minimum is "holy crap that's a lot of boilerplate for a bare minimum project". While I expected there to be some code necessary to get thing up and running, my mind spun at that 400loc build script. What the heck is that for if you are not actually doin…
You don't have to use the sbt script provided here. It's just for convenience: it will automatically install Java, Scala and dependencies. Run it and you don't have to hunt down anything from the web. If you have SBT already installed (with homebrew, MSI, apt-get etc), you don't need that file at all. Main.scala is a "println", Build.scala sets some compiler flags and project name - this is all. About "Unit": Scala i…
Re: Why Learn Scala in 2013?
#56Earlier quoted context omitted.
You don't have to use the sbt script provided here. It's just for convenience: it will automatically install Java, Scala and dependencies. Run it and you don't have to hunt down anything from the web. If you have SBT already installed (with homebrew, MSI, apt-get etc), you don't need that file at all. Main.scala is a "println", Build.scala sets some compiler flags and project name - this is all. About "Unit": Scala i…
Thanks for the response. Given it's going to the JVM I should have been more prepared for verbosity. I did a bit more reading and with your suggestions it seems my initial reaction is mostly just shock of a change from what I'm used to. I'll do some more research and will probably mellow out a bit :) Any suggestions on ebooks or otherwise to get started? Cheers!
Java and Scala have essentially the same bytecode output as both compilers were written by Martin Odersky.
There are many links below: free books, PDFs, articles, videos, tutorials.
Or just Google "The busy Java developer's guide to Scala" (article), "Scala for the impatient" (PDF), "A Tour of Scala", "An Introduction to Scala for Java Developers" (about REPL) etc.
Re: Why Learn Scala in 2013?
#57Re: Why Learn Scala in 2013?
#58The article seems to imply Scala jobs are taking off (19 pages). Are Scala jobs really outpacing Clojure and Haskell?
Re: Why Learn Scala in 2013?
#59When I first encountered Scala, my impression was that this would be Java 2.0. Two plus years later, that's still my impression. What this means to me is that if you are looking for a new work-a-day language (i.e. the language that you use to pay the bills; the ones that appear in the Tiobe top 25), then Scala is probably worth a look. However, if you are happy with your current working language and are, instead, loo…
I like Scala and didn't personally find it that hard to start using it but I'm not optimistic about its future as a mainstream alternative to Java. It's just too big and complex and (apparently) too GC heavy to be useful on what is quickly becoming one of the most important Java environments (Android). My money is on Jetbrains' Kotlin as a significant but manageable step forward from Java. Given its pedigree I expect…
2.9 manage to not change the language much, AFAIR, but now 2.10 gets macros[0], string interpolation, implicit classes, value classes, and a whole new concurrency framework.
All cool stuff, but the nonchalance in adding more and more things makes me uncomfortable.
[0] yes, I know, "experimental"
Re: Why Learn Scala in 2013?
#60Earlier quoted context omitted.
Why do you feel that sbt isn't simple/a disaster? I actually think it is the nicest of the build tools on JVM. I can set up basic projects with no configuration. Also, its triggered build feature[1] combined with its interactive console is a killer feature set that I think all build tools should have. [1] http://www.scala-sbt.org/release/docs/Howto/triggered.html
It is extremely inconsistent. The config file is a list of Scala expressions, however it is not a valid Scala code as a whole. And when you want subprojects, then suddenly the config file is not able to do that, you need to setup another directory with a totally different style of config to do that. On the other hand the interactive console is a killer feature, agreed.