English
Topic 8. Operator overloading, delegated properties, and class delegation
Goal: implement natural operations for your own types, validated property delegates, and decorators via interface delegation; explore the limits of these mechanisms.
Lecture contents
- Comparison and compound assignment — Short notation must keep a clear meaning · Comparison and equality semantics · Compound assignment and increment
- Indexing, ranges, and iteration — Indexing, invocation, membership, and components · Ranges and iteration
- Delegated properties — A delegated property · A lambda as a small action for a delegate · Lazy and initialization modes · Observable, vetoable, and Map
- provideDelegate and class delegation — provideDelegate: validation at binding time · Delegating an interface implementation · Designing and testing delegation