By jsugrue
via java.dzone.com
Published: Aug 26 2010 / 04:59
This article has been inspired by a thread that appeared on the Java Posse mailing list, that in turn was started as a comment to a blog post that tried to demonstrate how Scala could be less complex than Java.
Comments
RawThinkTank replied ago:
philho replied ago:
Well, I am a Java programmer (and previously C programmer, with deep or superficial knowledge of other languages, from Lua to Visual Basic...).
I just started to learn Scala.
Previously, I found the Scala code snippets seen in various articles quite unreadable, close of line noise so much detracted in Perl. Perhaps one cause is usage of operators as function names (I simplify...).
As I wrote, I only start of learn Scala, seeing some cool but seemingly arbitrary syntax sugar/language shortcuts presented in tutorials.
Now, I am reading the >Scala Overview> paper (listed in >Learning Scala> page) and I see the logic behind these shortcuts. At least Scala is a very consistent language, and once you grasped its logic, reading its code is much more straightforward.
Yes, that look like line noise... if you don't know the language! You can say the same of (some) Python (constructs), Objective-C or APL (OK, the latter IS line noise!).
The main difficulty with learning Scala is probably not the syntax itself, once one is familiar with it, but to set the mind to use the Scala programming paradigms. One can code like Java, or even like C in Scala, but one is probably more productive/efficient when thinking like a Scala programmer.
At least, familiarity with Lua and JavaScript makes concepts like functions as first-class values and closures less alien... :-)
philho replied ago:
Silly me, they state clearly that HTML tags are not supported. URLs are:
http://www.scala-lang.org/docu/files/ScalaOverview.pdf - Scala Overview
http://www.scala-lang.org/node/1305 - Learning Scala
Web Scripting replied ago:
Who should learn Scala?
philho replied ago:
Good question. Can be asked for a lot of other languages (Python, Ruby, JavaScript, Lua or even Scheme, Erlang and such).
What are the main motivations behind learning a new language?
- Job. I was out of job for a while, I finally found a training on Java, and shortly after I found a job as Java programmer.
If you program only for a living and have other hobbies on your free time, just improve your knowledge of the language you are asked to use. But be aware that languages go out of fashion. I coded a lot in assembly language and in C, but their usage declined and I found myself out of job... Keeping a curiosity for your domain is quite vital in our job. If you read DZone (or other online resources of information on the field), you have a good start! ;-)
Note: I am French. Out of curiosity, I made a quick search of Scala on a job site. No results. Same for JavaFX, which I learned previously. I checked Python to be sure I was doing searches correctly and I found some job offers. So we can say that, at least in France at the current time, learning Scala (or JavaFX!) for work is probably not a good idea, unless you are already in a company that what to use them.
- Curiosity. That's my main motivation here. I like to learn new languages and acquire a reasonable level of fluency with them. It allows to explore new ideas, on syntax, on paradigms (procedural vs. functional vs. OOP, etc.) and so on.
And, well, it might prove useful someday...
I learned the Web stack by myself (HTML, CSS, JavaScript, etc.) and I finally used this knowledge (plus PHP-fu) to build the e-shop of my wife, to maintain the Web interface of the product at my job, and so on.
Voters For This Link (37)
Voters Against This Link (0)