'a class is aways linearized before ...'

Dear All,

'Programming in Scala' (on p260) explains that,

a class is always linearized before *all* of its superclasses and
mixed in traits.

I never quite understood this at the time, and have just seen it
quoted in Fredrik Skeel Løkke's thesis on design patterns.

After a determined effort to understand, I now reckon it should say,

a class aways appears before its superclasses and mixed-in traits,
in the sequence resulting from its linearization.

From the worked example (Cat class), it looks as though the superclass
is in fact linearised first, followed by each mix-in in turn (from
left to right), and then the class itself is appended last. The
resulting list is then reversed.

Anyone agree?

Rob

Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland