Sunday, November 18, 2012

Should You Learn Scala?

It depends on what you want to accomplish*, but the answer is probably yes.

By way of background, Scala is a programming language originally developed at the Swiss university EPFL in an attempt to apply recent innovations in programming languages research to a language that can gain mainstream traction.  Researchers keep coming up with clever ways to it easier for programmers to write correct code and to write less code, but much of the time only academic programmers benefit because these features are implemented in boutique languages (for instance, OCaml and Haskell) that are not in widespread use in industry or open source projects.

On its own, without considering features such a libraries and interoperability, Scala is a nice language.  It is "multi-paradigm," supporting object-oriented programming and functional programming idioms.  Scala allows you to define types associated with both data attributes (with classes behaving like C++/Java classes) and behavior attributes (with traits corresponding to Java interfaces).  In the way of functional programming idioms, Scala functions are first-class (which means you can pass them around as values) and Scala also supports anonymous functions and currying (partial application of multi-argument functions).  This combination of features make it possible to write Scala programs that are quite concise and elegant**.

Scala's libraries and interoperability make it a force to be reckoned with.  Scala runs on the Java Virtual Machine (JVM) and can interoperate nicely with Java code.  This means that you can use Java libraries directly from Scala code.  It is also possible to call Scala code from Java (see here).  There is a nice post about how you can take advantage of Scala parser combinators, which use higher-order functions to help you write concise parsers, to write parsers for systems otherwise written in Java.  Not only can you do all of the things in Scala, you can easily write part of your program in Scala and the rest in Java.  (This is huge for mainstream adoption potential because so much of the world's code is written in Java and so many developers are taught in school!)

Learning Scala will make you more marketable.  Many companies are using Scala these days, including LinkedIn, FourSquare, Twitter, and Quora.  The founders of Quora spent a couple of months building a Scala web framework in order to use Scala.  Martin Odersky, the man behind Scala, is now behind the startup Typesafe for supporting Scala development.  There are some nice Scala web frameworks out there, including Lift and Play.  Scala is also gaining traction in the research community.  Many more people cared about our research on the Jeeves programming language for automatically enforcing privacy policies once we implemented it as an embedded domain-specific language in Scala.

Scala is also relatively easy to learn, especially compared to other strongly statically typed languages (OCaml; Haskell).  I have previously said that Python is the most marketable language for beginners, but I am beginning to change my mind.  Like Python, Scala has clean syntax, nice libraries, good online documentation, and lots of people in industry using it.  Unlike Python, Scala also has a static type system that can prevent you from doing bad things (whereas in Python the bad things just happen when you run the program).

If you are teaching a course using Java, you may want to consider switching to Scala.  I have recently had positive experiences teaching Scala to MIT undergraduates during recitation in 6.005, the software construction course taught primarily in Java.  During three recitations I introduced how to use functional idioms, how to build an evaluator for a simple language by using data types and pattern matching, and how to build an incredibly concise parser for the tiny language using parser combinators.  You may find my notes here, along with the accompanying code examples.

If you are considering the merits of Scala over other languages, you may also be interested in reading my Quora responses to the questions "What makes a good programming language?" and What are the advantages of Scala over C++ and Haskell?.

* If you are building scientific applications, a language with more math support (Matlab; Mathematica; R) may be superior.  If you just want to do a weekend project writing a Craigslist scraper, Python may be better because it is easier to learn and has great web scraping libraries.
** Okay, Scala programs are not as beautiful as OCaml or Haskell (I have another post on ML vs. Haskell) but it's so much more practical in many ways.

82 comments:

Clement Levallois said...

2 questions:
- Would your recommend a book or textbook for somebody coming from Java?
- and a book / or any source that would focus on the advantages of Scala for server side programming (I use JSF, why should I be interested in Scala?)
Thx a lot!

Jean said...

Here are some useful links for learning Scala from Java:
- http://www.ibm.com/developerworks/java/library/j-scala01228/index.html
- https://blogs.oracle.com/sundararajan/entry/scala_for_java_programmers

You may be interested in learning about the Play MVC framework:
http://www.playframework.org/
There is a book with an early access edition about it:
http://www.manning.com/hilton/

Clement Levallois said...

thx!

christi parks said...

Hello, sir i would like to ask that what is the scope of java training, what all topics should be covered and it is kinda bothering me … and has anyone studies from this course http://www.wiziq.com/course/1779-core-and-advance-java-concepts of core and advance java online ?? or tell me any other guidance...
would really appreciate help… and Also i would like to thank for all the information you are providing on java concepts.

Mark Lewis said...

Great post. I love that you mention Scala as an option for introductory programming. I have been using it as the exclusive language of instruction for CS1 and CS2 at Trinity University since Fall of 2010 and I love how it works. Since there wasn't much material out there for that purpose I wound up writing a lot myself and it turned into this, http://www.amazon.com/Introduction-Programming-Chapman-Textbooks-Computing/dp/1439896666.

Nghia Huynh Trong said...

I do know that Scala is based on Java. So I would like to ask you whether I need to learn Java first, if not is there any diffculties?

Jean said...

You should not have to learn Scala first to learn Java. It may be useful to know some Java if you want to access Java libraries.

Randy said...

Hi Jean, really great article. I was just wondering what your thoughts are on how well scala stacks/compares against c#? Do you think scala will actually be a "successor" to java as some are claiming? And if it is a successor to java, which language do you think has a brighter future, c# or scala? also, which one do you think is more object oriented or has a better OOP model, c# or scala? thanks and sorry for all of these questions.

heena goyal said...

Hi,
Very informative information provided.
Is online training reliable?
I have never taken any but these days if you want to study from the best teachers online learning is best. So i have decided to do my online java training course from http://www.wiziq.com/course/12145-the-6-week-complete-java-primer-with-training-certificate as one of my friend recommended me this site. I don't know how is it going to work for me so if anybody have studied from this site please let me know .

sudheer said...

The information which you have provided is very good and easily understood.
It is very useful who is looking for java Online Training.

Anonymous said...

Indeed Java dev should now look to Scala. This article has covered some difference between Scala and Java and also shared few resources to learn Scala.

prabodh said...

I am from C++ background and do not know Java. DO you think I should go for Scala or learn Core Java first and then think of Scala?

Bala Murugan said...

This really useful this blogs i like it,CompTIA CASP Training VA
|CEH Training Fairfax VA

syed s said...

I was reading your blog this morning and noticed that you have a awesome
resource page. I actually have a similar blog that might be helpful or useful
to your audience.

Regards
sap sd and crm online training
sap online tutorials
sap sd tutorial
sap sd training in ameerpet

kits online said...

kits online trainings provides best online training for all it technologies

Ruby On Rails Training

SAP XI Training

OBIEE Training

Talend Training

PHP Training



Ravindra Reddy said...

Best kits online trainings,thanks for sharing

SAP Success Factors Online Training institute

SAP WebDynpro Online Training institute

SCCM 2012 Online Training institute

Selenium Online Training institute

Solaris Online Training institute

kits online said...

very nice article.Thanks for sharing the post..!
Oracle Golden Gate Online Training By Real Time Faculties

Ruby Online Training By Real Time Faculties

SAP XI Online Training By Real Time Faculties

OBIEE Online Training By Real Time Faculties

Talend Online Training By Real Time Faculties

PHP Online Training By Real Time Faculties

Coy Currin said...

Thanks for nice topic. I like it. We are Providing Online Training Classes. SAPMMonlinetraining

Anonymous said...

kits online trainings provides best online training for all it technologies
SCOM 2012 Online Training Institute

SAP Bw Hana Online Training institute

Oracle SOA Online Training institute

for IT the said...

Online Java Training | Online Java Training India | Online Java EE Training | Online Java EE Training India | Online Java Training Institutes

for IT the said...

Online Java Training | Online Java Training India | Online Java EE Training | Online Java EE Training India | | Online Java Training Institutes

Karthika Shree said...

It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command.
Java Training in Chennai

KarlDeville said...

Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
http://www.mcdonaldsgutscheine.net/ | http://www.startlr.com/ | http://www.saludlimpia.com/

suresh H said...

AngularJS Training Institute in Chennai
AngularJS Cetification Training in Chennai
AWS Training in Chennai
AWS Devops Training in Chennai
Best AngularJS Training in Chennai
AngularJS Training in Chennai

Praveen said...

Nice article
artificial intelligence online training
python online training
talend online training

Upender said...

Nice blog this informations is unique information i haven't seen ever by seeing this blog i came know lots of new things
those are very useful tom me i will suggest the peopele who are looking this type of information
python training in hyderabad the best career

upender anagandula said...

nice blog thank you for sharing wonderful information
python training in Hyderabad the best career

Roja Priya said...

Great efforts put it to find the list of articles. thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.
Angular JS Training in Chennai | Angular JS Training in Velachery

Alister cook said...

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.

aws training in chennai

advanced aws training in chennai

Prasad Gowtham said...

Great post! Thanks for sharing with us, Its really gives lot of useful information. Regards,

Angularjs Training in Chennai

samala swathi said...

This concept is a good way to enhance the knowledge.thanks for sharing. please keep it up
core Java online training Hyderabad

SRI said...

Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

rpa training in marathahalli

rpa training in btm

rpa training in kalyan nagar

rpa training in electronic city

rpa training in chennai

rpa training in pune

rpa online training

Ram priya said...

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
Data Science training in chennai
Data science training in velachery
Data science training in tambaram
Data Science training in OMR
Data Science training in anna nagar
Data Science training in chennai
Data science training in Bangalore
Data Science training in marathahalli

Deepika Analy said...

Great Article...Thanks for sharing the best information.It was so good to read and useful to improve my knowledge as updated one.

Mobile Apps Training
Mobile Apps Training in Chennai

sai said...

This is beyond doubt a blog significant to follow. You’ve dig up a great deal to say about this topic, and so much awareness. I believe that you recognize how to construct people pay attention to what you have to pronounce, particularly with a concern that’s so vital. I am pleased to suggest this blog.
python training in velachery
python training institute in chennai

shethal said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
Devops Training in pune
Devops Training in Chennai
Devops training in sholinganallur
Devops training in velachery

pavithra dass said...

Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
AWS Course in Chennai
Aws Certification in Bangalore
AWS Certification Training in Anna nagar
AWS Courses in T nagar

akhilapriya404 said...

Thanks for sharing this blog post,Nice written skill core Java Online Training Bangalore

Anonymous said...

Selenium is one of the most popular automated testing tool used to automate various types of applications. Selenium is a package of several testing tools designed in a way for to support and encourage automation testing of functional aspects of web-based applications and a wide range of browsers and platforms and for the same reason, it is referred to as a Suite.

Selenium Interview Questions and Answers
Javascript Interview Questions
Human Resource (HR) Interview Questions

Priya Rajesh said...

Interesting blog, it gives lots of information to me. Thanks for sharing such a nice blog.
DevOps Training in Chennai
DevOps Training near me
Angularjs Training in Chennai
AWS Training in Chennai
RPA Training in Chennai
Blue Prism Training in Chennai

Meera Kumar said...

I think things like this are really interesting. I absolutely love to find unique places like this. It really looks super creepy though!! R Programming institutes in Chennai | R Programming Training in Chennai | R Programming Course Fees | R Language training in Chennai

sumant kumar said...

nice blog.thank you for sharing informative post.
web prograaming tutorial
welookups

IT Tutorials said...

Great efforts put it to find the list of articles which is very useful to know, Definitely will share the same to other forums. hadoop training in chennai velachery | hadoop training course fees in chennai | Hadoop Training in Chennai Omr

LindaJasmine said...

Interesting Post. Looking for this information for a while. Thanks for Posting.

Node JS Training in Chennai
Node JS Course in Chennai
Node JS Advanced Training
Tableau Training in Chennai
Tableau Course in Chennai
Primavera Training in Chennai
Primavera Course in Chennai
Pega training in chennai
Pega course in chennai

Aruna ram said...

Really thank you!!!This is one marvelous blog article. I appreciate your sharing this post.
Learn Ethical Hacking in Bangalore
Best Etical Hacking Training in Bangalore
Ethical Hacking Training in Chennai Adyar
Hacking Training in Adyar
Ethical Hacking Training in Velachery
Ethical Hacking Training in Chennai Velachery

Vicky Ram said...

Thanks for your sharing such a useful information. this was really helpful to me

Guest posting sites
Education

mercyroy said...

This blog is more effective and it is very much useful for me.
we need more information please keep update more.
vmware Training in Saidapet
vmware Training in Ashok Nagar
vmware certification bangalore
vmware training center in bangalore

aruna ram said...

Such a great think. Your post is very knowledgeable. Please keep updating......
Digital Marketing Course Bangalore
Best Digital Marketing Classes in Bangalore
Digital Marketing Training in Bangalore
Digital Marketing Training in Tnagar
Digital Marketing Training in Nungambakkam
Digital Marketing Training in Omr
Digital Marketing Training in Kelambakkam

sathyaramesh said...

I want to thank you for this great blog! I really enjoying every little bit of it and I have you bookmarked to check out new stuff you post.
Web Designing Training Institutes in Chennai
Best Web Designing Institute in Chennai
Best web designing course in chennai
PHP Training in Chennai
PHP Course in Chennai
PHP Training Institute in Chennai

Anbarasan14 said...

I liked your blog.Thanks for your interest in sharing the information.keep updating.

IELTS Coaching in JP Nagar Bangalore
IELTS in JP Nagar
IELTS Classes in JP Nagar
IELTS Training Institute near me
Spoken English Classes in JP Nagar
English Speaking Course in JP Nagar Bangalore
Spoken English Classes in Bangalore JP Nagar

Aravind said...

I am really enjoying reading your well written articles.
It looks like you spend a lot of effort and time on your blog.
Website Design Course in Bangalore
Best Web Designing Course in Bangalore
Web Designing Classes in Bangalore
php institute in bangalore
best php training in bangalore
php training center in bangalore

Sadhana Rathore said...

Thanks for sharing this pretty post, it was good and helpful.
R Training in Chennai
R Programming Training in Chennai
RPA Training in Chennai
AWS Training in Chennai
DevOps Training in Chennai
Angularjs Training in Chennai

Unknown said...

Your post is really awesome. Your blog is really helpful for me to develop my skills in a right way. Thanks for sharing this unique information with us.
- Learn Digital Academy


kate technologies said...

Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
php internships in hyderabad
best php development companies in hyderabad

Unknown said...


Excellent blog, good to see someone is posting quality information.
DevOps Online Training

nanadhini chandran said...

nice thoughts you have attached in your post.surely i look into this insight and gather lot of new ideas.please update such Kind of information's more in future.
Software Testing Training Institutes in OMR
Software Testing Courses in OMR
Software Testing Training in Guindy
Software Testing Training in Saidapet
Software Testing Training in Perambur
Software Testing Training in Mogappair

Praylin S said...

Awesome post with great content. Thanks for your time and effort. Keep posting.
JavaScript Training in Chennai | JavaScript Course in Chennai | JavaScript Training institute in Chennai | JavaScript Course | JavaScript Training | JavaScript Training Center in Chennai | JavaScript Training Courses | JavaScript Training Classes

Unknown said...

python online training
artificial intelligence training
machine learning online training
aws training
we are go to help people to crack interview by providing interview questions. Here I am giving some interview questions related sites, you can visit and prepare for interview
dbms interview questions
bootstrap interview questions

Bigclasses04 said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
Data Science Online Training

kate technologies said...

Useful Information, your blog is sharing unique information....
Thanks for sharing!!!
php development companies in hyderabad
php development companies in gachibowli
php development companies in kphb

sai Bigclasses said...

Thank you for your informative article. Best Python Online Training || Learn Python Course

kritika mytectra said...

Currently Python is the most popular Language in IT. Python adopted as a language of choice for almost all the domain in IT including Web Development, Cloud Computing (AWS, OpenStack, VMware, Google Cloud, etc.. ),Read More

Unknown said...

Your information is really awesome as well as it is very excellent and I got more interesting information from your blog.
Welcome to thewebnuts, one of the best graphic design institutes in pune. Which provide best Web Graphic designing Courses pune, Graphic design classes in pune, Graphic design training institute pune and Graphic design courses in pune? For registration or any query call us: 7040660115 / 9511707582
graphic design courses in pune
graphic design classes in pune
graphic design training institute pune

yamuna said...

Best Core Java Training Course in hyderabad Technologies Solutions is the best Core Java Training Institute in madhapur providing Core Java Training classes by real-time faculty with course material and 24x7 Lab Facility.

Revanth Dondapati said...

Java is a simple, object-oriented, interpreted, distributed, robust, architecture neutral, secure, portable, multithreaded, high-performance and dynamic language. Revanth Technologies provides the best Java Online training and other IT Courses.

We Java course tailored to the expectations of the industry like core Java for working Java developers, Java Struts for web application developers etc. We have the faculties who has more experience and currently working in MNC's, So you will get not only the entire depth about the concept rather you will get real time use for them from their experience.

We will provide hands-on training on basic and advanced concepts such as Core Java, J2EE, Spring, Struts, Hibernate, Web Services etc. The trainers of both fundamental and advanced Java courses are extremely professional and knowledgeable. The recorded sessions of all the lectures will be provided to you by them.

Free demo will be given before training by real time faculty and well trained software specialists

For more details please contact 9290971883 / 9247461324 or drop a mail to revanthonlinetraining@gmail.com or you can whatsapp me on 9290971883

Java training in Mumbai said...

Nice blog..! I really loved reading through this article. Thanks for sharing such a amazing post with us and keep blogging...

Joe said...

Awesome Write-up. Brilliant Post. Great piece of work. Waiting for your future updates.
Informatica Training in Chennai
Informatica Training institutes in Chennai
Informatica Training in T Nagar
Photoshop Classes in Chennai
Photoshop Course in Chennai
IELTS coaching in Chennai
IELTS Training in Chennai

jefrin adams said...

Nice blog very interesting to read
Tableau training chennai

jagadeesh said...

I found the information on your website very useful.Visit Our 3 bhk Flats in Hyderabad
Visit Our Reviews Aditya constructions Reviews

priya said...

I was looking for this certain information for a long time. Thank you and good luck.
Data Science training in Chennai
Data science training in Bangalore
Data science training in pune
Data science online training
Data Science Interview questions and answers
Data science training in bangalore

Shadeep shree said...

Outstanding Blog!!! Thanks for sharing with us...
CCNA Course in Coimbatore
CCNA Training in Coimbatore
CCNA Course in Madurai
CCNA Training in Madurai
Ethical Hacking Course in Bangalore
German Classes in Bangalore
German Classes in Madurai
Hacking Course in Coimbatore
German Classes in Coimbatore

jefrin adams said...

Wow good to read
Best R programming training in chennai

Ananya Krishnan said...

Good job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work

DevOps is currently a popular model currently organizations all over the world moving towards to it. Your post gave a clear idea about knowing the DevOps model and its importance.

Good to learn about DevOps at this time.


devops training in chennai | devops training in chennai with placement | devops training in chennai omr | devops training in velachery | devops training in chennai tambaram | devops institutes in chennai | devops certification in chennai | trending technologies list 2018

Robotic Process Automation Tutorial said...

Really useful information. Thank you so much for sharing.It will help everyone.Keep Post. RPA training in chennai | RPA Uipath training in chennai | RPA training in Chennai with placement

Aman CSE said...

Such a wonderful blog on Machine learning . Your blog have almost full information about Machine learning .Your content covered full topics of Machine learning that it cover from basic to higher level content of Machine learning . Requesting you to please keep updating the data about Machine learning in upcoming time if there is some addition.
Thanks and Regards,
Machine learning tuition in chennai
Machine learning workshops in chennai
Machine learning training with certification in chennai

Roja Priya said...


Thank you for sharing your article. Great efforts put it to find the list of articles which is very useful to know, Definitely will share the same to other forums.

best openstack training in chennai | openstack course fees in chennai | openstack certification in chennai | openstack training in chennai velachery

luckys said...

indian whatsapp group links

franklinraj said...

Thank you for excellent article.

Please refer below if you are looking for best project center in coimbatore


soft skill training in coimbatore
final year projects in coimbatore
Spoken English Training in coimbatore
final year projects for CSE in coimbatore
final year projects for IT in coimbatore
final year projects for ECE in coimbatore
final year projects for EEE in coimbatore
final year projects for Mechanical in coimbatore
final year projects for Instrumentation in coimbatore

Aman CSE said...

Appericated the efforts you put in the content of Data Science .The Content provided by you for Data Science is up to date and its explained in very detailed for Data Science like even beginers can able to catch.Requesting you to please keep updating the content on regular basis so the peoples who follwing this content for Data Science can easily gets the updated data.
Thanks and regards,
Data Science training in Chennai
Data Science course in chennai with placement
Data Science certification in chennai
Data Science course in Omr

Saurav Singh said...

Thanks for such a great article here. I was searching for something like this for quite a long time and at last, I’ve found it on your blog. It was definitely interesting for me to read about their market situation nowadays.
Python Training in Noida

Vamshi Singh said...

Nice, it was definitely interesting for me to read about their market situation nowadays.
AWS Training in Delhi

Anonymous said...

Thanks for sharing such a great article here
Networking Training in Gurgaon