“I picked the rather odd name method-cache to give me an excuse to point out that this implementation isn’t completely silly.”
What did we read about?
This is our sixth week reading Functional Programming for the Object Orientated Programmer.
Begin on page 56 at the start of the chapter, read until page 73, leaving exercises for next week.
This week we finally start learning about Recursion and how it can be used to implement Inheritance in our object system. We touch on using assert for pre-conditions and define a superclass “Anything”. In a rather round-about fashion, we look at how we can do method overriding.
Although rather slow and slightly patronising at times, the book covers different patterns for recursion and visits the problem of tail recursion.
What stood out?
- The use of a method-cache to do method overriding is very silly but somewhat interesting.
If you read nothing else this week…
- Try to get to grips with all the types of Recursion, this will stand you in good stead to do the exercises next week.