“Given a large enough dos elf magic mushrooms, we can hallucinate that the class-of, x and y callables are instance methods of Point”
What did we read about?
This is our third week reading Functional Programming for the Object Orientated Programmer.
Begin “I Embedding an Object-Oriented Language”, read until p. 46 (“All the Class in a Constructor”)
We delve into writing a pseudo object-orientated language within Clojure. Firstly we cover the semantic/definitions of everything we will be dealing with (i.e. objects, instances). Whilst a bit verbose, it helps to establish a common ground for which we can all work off.
With all that out of the way, we dive into implementing a basic geometry. We gradually build up Point objects, adding methods until we have reached Triangles!
As always, the exercises at the end serve as excellent tests of your understanding on the topic. Although the material covered may not be vast, it is important to practice programming functionally to make the next part of the book easier to grasp.
What stood out?
- The introduction explains this chapter well as a section focussing on giving us the “opportunity to practice programming in a functional language”. This experience will “make the topics in the next part of the book easier to grasp”.
- Exercise 3 & 4 are actually fairly involved and challenge you to think in the functional way.
If you read nothing else this week…
- Jump straight to “A Barely Believable Object” to get into the implementation details!