Core concept

class Outer { class Inner }
val o1 = new Outer; val o2 = new Outer
// o1.Inner != o2.Inner
Advertisement

How it works

Confusing initially. Powerful for library design.

Advertisement

Trade-offs + gotchas

Type-safe abstractions where inner type depends on outer.