Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In Scala, what are the essential areas that beginners (in my case, I migrating from Java) has to learn to master the language?

Regardless of the method of learning (e.g., books, reading blogs, project euler) what order should one learn the essential aspects of Scala?

share|improve this question
1  
All this talk about Odersky: note that his free online course Functional Programming Principles in Java starts today. I can't think of a better introduction. – GlenPeterson Sep 18 '12 at 18:17
In addition to the answers, I have just started learning Scala and have found the knowledge drawn from SICP to be tremendously useful. Functional programming knowledge helps make the most of this language. – Rig Sep 18 '12 at 18:26

migrated from stackoverflow.com Apr 29 '11 at 18:23

7 Answers

I've read the Programming Scala (O'Reilly), and now I'm reading Programming In Scala written by Martin Odersky.

I highly recommend to read the book by Martin Odersky, this book is WAY better than the other and give you a real sense of functionnal programming and a deep understanding of the language !

http://www.artima.com/shop/programming_in_scala_2ed

This is definitely the best way I found to dive into Scala !

share|improve this answer
3  
The first edition of the Odersky et al. book is freely available online. – Kipton Barros Apr 28 '11 at 17:06

The blog is fine. Another one with lessons for beginners is tony morris blog .

There are good introductory videos on parleys, on infoq and to be found on the main page from scala.

I would start with a mix - video is entertaining and makes hungry, take the short reference and online pdfs, as well as the blogs, and look for the '99 scala problems'. Try to solve problems, and reread your material if you get stuck.

Practice, practice, practice. Start small projects. Read here on SE, read blogs, the mailinglist. Get two or 3 books and study them in depth. Always: practise.

Update:

Since @Synesso got 3 up-votes for claiming, that Tony's blog isn't useful for beginners, I thought why this is a popular belief, and came to the opinion, that the older posts, more addressed towards beginners, need some popularisation, so I do you a favour and give precise links, and assert you, that I enjoyed them as a beginner. Now you're in the dilemma to believe me, or to think that I'm a genius. But sadly, I'm not. ;(

Here are

Enjoy.

share|improve this answer
4  
Tony's blog is good, but it is definitely not for beginners. – Synesso Apr 28 '11 at 6:28
Well, I updated my post, @synesso, to prove you wrong. There are exercises explicitly towards beginners. – user unknown Apr 29 '11 at 0:07
Thanks UU. +1 for attention to detail. IRT Tony's blog. I think the content is there, but that it is somewhat unaccessible for a complete beginner. More hand-holding is required to make it truly beginner-friendly. – Synesso Apr 29 '11 at 2:41
prassee is asking as Java-programmer at least, so he isn't new to programming, but to Scala only. Every programmer should be able to start with the exercises for beginners - it isn't that hard. And it isn't a replacement for a book, for an introduction. – user unknown Apr 29 '11 at 3:54
I think Tony's option exercise is one of the best of all exercises out there, and make an excellent transition from beginner to intermediate. Let's say it's beginner's graduation exercise. :-) – Daniel C. Sobral Apr 29 '11 at 19:13

This is a good start: http://www.codecommit.com/blog/scala/scala-for-java-refugees-part-1

The author wrote 6 blog posts on the issue.

share|improve this answer

This is my favorite subject, as I too had a hard time getting into Scala. Do not get me wrong - I loved the language from the start - but there were so many parts to take in.

Remember that most software problems you encounter in the enterprise are not mathematical problems, therefore OO is what you should start out with to be able to do some damage in the organization.

To begin with you can safely skip the cool parts, like implicits and actors. What you really need for all everyday work is a deep understanding of the class, object, trait, apply(). To be able to work with immutable data you will need to understand the basics of functional programming, learn match and the for-yield construct.

Now you should learn SBT. I have found that this tool is essential, hope you learn to love it too.

Good luck!

share|improve this answer

If you come from Java the most important thing is to learn functional programming. Learning Haskell certainly helped me a lot cause it forces you to think in a functional way without resorting to old stateful habits. Real World Haskell is a quite good book to read.

share|improve this answer
Also worth mentioning and free online is "Learn You a Haskell for Great Good" – Philip JF Sep 19 '12 at 0:53

I'm surprised nobody cited Odersky's stance on "what order to pick subjects to learn."

share|improve this answer
This is what iam exactly looking for thanks @Toland – prasonscala Apr 29 '11 at 1:04

To master the language you have to learn how implicits work, plus all the different types and things like type constructors. Also, you'll need to bone up on persistent data structures, and some important functional concepts, like monads. Mmmmm. Basically, learn all of Scalaz, and you'll have some 80% of all of Scala. :-)

But from Java, that is the last thing you should do. You should first concentrate on what things are equivalent, what differences there are (for example, secondary constructors), and learn what functions are and how to use them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.