Another tour of Scala

 
 
 
 

Main Page

Viewing old version 060a6341f5bb418720ac0737cb0be2c3f82bf82e; View Current

This is my own “re-telling” of the tour of Scala from the official Scala website. If you are wondering why another tour, it’s mostly because it was fun and informative. I hope you feel the same way.

You should be able to go through these in the order listed, with each building on previous topics. I’ve also linked to the original tour topics as well as added my own where I thought it might help.

Basics

  1. ScalaBasics – Scala has some surprising syntax for both Javaists and Rubyists. This is a crash course.
  2. UnifiedTypes – everything is an object. Even Int. Finally.
  3. ScalaClasses – Scala is object-oriented.
  4. ScalaProperties – Scala intelligently handles so-called “getters” and “setters”…by not having them
  5. ScalaPackages – Scala allows code to be packaged for visibility and organization.
  6. ScalaObject – Scala has direct support for singleton objects.
  7. ScalaTraits – Scala allows multiple inheritance via mixins.
  8. ScalaGenerics – Scala allows parametrized types.
  9. ScalaAnnotations – Scala can use Java annotations.
  10. ScalaOperators – Scala’s flexible syntax lets you create your own operators.
  11. JavaIntegration – Scala can call anything that Java can.

Intermediate

  1. ScalaFunctions – Scala has strong support for functional programming.
  2. PatternMatching – Scala has an advanced switch/case system.
  3. FunctionCurrying – define a function that has received some of its parameters now, and will get the remainder later.
  4. CaseClasses – taking switch statements to a useful level.
  5. SealedClasses – tightening up CaseClasses.
  6. XmlLiterals – Scala allows XML literals that are smarter than strings.
  7. ForComprehensions – don’t let the name confuse you; this is about Scala’s powerful for loop construct.
  8. TypeBounds – Scala’s generic types can be restricted and bound for (alleged) understandability.
  9. InnerClasses – Scala supports nesting classes within objects and other classes.
  10. ImplicitConversions – Scala can implicitly convert objects to other types.
  11. CallByName – You can defer the evaluation of parameters until they are used.
  12. TypeDependentClosures – Scala has proper support for closures. Take that, Java!

Advanced

  1. ImplicitParameters – Scala can automatically pass parameters to methods that need them!
  2. TypeVariance – Scala supports more advanced generics/type parametrization via covariance and contra-variance. Your instinct is to run far away, but I think I’ve found a way to explain it.
  3. AbstractTypes – Scala supports type aliasing and abstract types as an alternative to generics/type parametrization.
  4. AdvancedScalaObjects – Scala’s singleton objects are quite powerful.
  5. DuckTyping – Scala supports duck typing. Take that, Ruby!
  6. ActorsAndConcurrency – Scala uses an actor/message-passing style of concurrency.
  7. ExplcitlyTypedSelfReferences – This is like the final boss in Super Mario 3. Good luck.

Last Updated 09/21/2009 at 02:58:06 PM by davec

blog comments powered by Disqus