SENG 365 — Software Engineering
2026-07-24
Reading: Robillard, 3rd ed. — Ch. 9, Functional Design (pp. 241–272).
aPen go: 100 + 20 — late binding, dynamic typing.f(g(x)).curl http://localhost/numberAfter/5 → [always 6]
curl http://localhost/customer/5/v1 → [always v1]
curl http://localhost/customer/5 → [may differ]
Get the same answer regardless of how many times you do it.
resizeTo100px(image)vs.shrinkByHalf(image)
while(!done) { fence.paint(); }paint(l=20, w=3)Functions are first-class program entities (before Java 8, only objects were).
Comparator was just a function wrapped in an object.Functional interfaces — one abstract method (e.g. java.util.function.Predicate).
Lambdas — anonymous functions without class ceremony:
Method references — a pointer to the method itself:
ConcurrentHashMap + Consumer radically reduces code.filter).
Neil Ernst ©️