Another tour of Scala

 
 
 
 

Main Page

Viewing old version 70e9aa2dc1af342f9ee6557aca14809deb49bf41; View Current

Why

I find the tour of scala a nice idea, but very difficult to follow for a few reasons:

  • The level of the tour elements skips from extremely basic to beyond advanced without a good guide through. This has left me scratching my head at some of the more advanced concepts.
  • Many of the features are demonstrated via mathematical conecpts or completely arbitrary calculations (how often do I need to take a list and arbitrarily modulo its contents into a new list?)
  • Some features are demonstrated by setting up a convoluted problem that the feature magically solves, leaving me wondering why the feature even exists, when a simpler design for the problem at hand would have obviated the need for it.
  • The more advanced topics are described in very terse format and difficult to understand without what I assume is a deep understanding of Scala already or some other functional programming language.

So, I’m going through each thing and trying to:

  • Order them sensibly, so previous topics support future ones
  • Create more real-world situations where a feature might be useful (I make you this promise: The word “monoid” will never be used again in these pages)
  • Comment on my own thoughts as to the utility of the feature.

I’m also a Java programmer by trade, so a lot of the “justification” aspects that come to me are in comparison to Java.

The Tour

These are in a reasonable order to allow subsequent tour elements to build on previous ones, and to keep the learning curve at a reasonable level.

Basics

  1. ScalaBasics
  2. UnifiedTypes
  3. ScalaClasses
  4. ScalaPackages
  5. ScalaTraits
  6. ScalaGenerics
  7. ScalaAnnotations
  8. ScalaOperators

Intermediate

  1. ScalaFunctions
  2. PatternMatching
  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
  7. ForComprehensions – don’t let the name confuse you; this is about Scala’s powerful for loop construct
  8. TypeBounds
  9. InnerClasses – you only thought they were basic.
  10. ImplicitConversions
  11. TypeDependentClosures – Closures in general discussed here, too.

Advanced

  1. TypeVariance
  2. AbstractTypes – not abstract classes
  3. ExplcitlyTypedSelfReferences

TODO

I haven’t looked at this and they are not all covered by the above (though some may be)

  • ImplicitParameters
  • HigherOrderFunctions
  • ExtractorObjects

Last Updated 07/31/2009 at 02:26:54 PM by davec

blog comments powered by Disqus