Mention teaching with Scala on the Scala website

Scala is a fantastic teaching language as it is less prone to wear down the grit of my students compared to other programming languages that I have used for teaching introductory computer science, such as Java and Python. This is due to several nice aspects of Scala, including:

  • Static types. The student get help from the compiler to find bugs before runtime. If a student have too many difficult-to-hunt-down runtime bugs, this can take away the joy of learning and cause fatigue so badly that a student may give up prematurely and get a feeling of bad self-efficacy and loose motivation. Instead, in my experience with Scala, the dialog with the compiler about static errors strongly supports conceptual learning and strengthens self-efficacy: “I can do this and I’m getting a grip of it!”.
  • The Scala REPL and its type inference echoing. Already before students have understood some basic programming concepts, they can start playing with things they know from math class in the REPL. As they engage further in a “dialogue of types” they boost their understanding of the semantics of data types and what happens when you compute new values based on existing values, etc. Many dynamic languages have REPL-support, but without static types and compiler error messages, you miss out a large part of the conceptual learning from the REPL feedback.
  • Regularity and principled constructs. Scala has done away with many of the quirks from C-like languages that still remain in e.g. Java and C#. There are, for instance, no surprising restrictions on what can be nested inside what, and no irregular semantic difference between primitive non-objects and “real” objects. The level of regularity and generality of principled concepts in Scala is the best I have seen so far in a multi-paradigm language. Every strange irregularity and tricky exception wear down the grit of students and take up time in teaching that can be much better spent.
1 Like