Unused Scala features (OOP2015)

From Spivey's Corner
Jump to: navigation, search

Here's a brief guide to the parts of Programming in Scala (1st edition) that will be useful for the course.

  • Chapters 1–8 are basic and needed.
  • Chapter 9 (Control abstraction) is not needed.
  • We will need the constructs in Chapter 10 (Composition and inheritance), but not the examples.
  • Chapter 11 (Class hierarchy) provides useful background for how things really work.
  • The information in Chapter 12 (Traits) is useful, but we will rarely mix together multiple traits or rely on their stacking order.
  • We will not define new packages (Chapter 13) or make elaborate use of imports, but we will be making great use of private members (Section 13.4).
  • We will use assertions (Section 14.1) including assert/require/assume. Some unit tests will be written by using ScalaCheck directly, without replicating in a 'testing framework' what can easily be done by a makefile or shell script.

These features of Scala are not used in the course.

  • Parameters passed by name.
  • Case classes.
  • The class List of pointer-linked lists.
  • Abstract members, apart from methods.
  • Implicit conversions and parameters (with one exception).
  • The foryield construction.
  • Any but the simplest cases of the rules for linearizing traits.
  • Named and default parameters.
  • Lazy val definitions and pre-initialised fields.
  • Variance annotations for generic parameters.
  • Packages and package objects.
  • Actors and concurrency.
  • Combinator parsing.
  • Exceptions, apart from assert/require/assume and a few places connected with I/O.
  • XML literals.
  • Extractors.
  • Annotations.

If you think that means we will be using largely the Java subset of Scala, then you are just about right.

Personal tools