Skimmers Guide for Week 12 of Functional Programming for the Object-Oriented Programme

29 Jun

“With loosely-coupled objects that communicate only by passing behaviors (functions) around (rather than entire bundles of state and behavior in the form of objects), the early part of design may become easier.

What did we read about?

This was our twelfth week of ‘Functional Programming for the Object-Oriented Programmer‘ by Brian Manick.

We begin on Page 115 at the start of section 9.4, picking up the exercises from last week’s reading. We finish at Page 120 at the end of chapter 9.

The exercises revolve around putting into practice what we have learnt about “Point-Free Programming”. We are introduced to the new juxt function before being tasked with a diverse set of exercises to test understanding on various topics so far.

Finally we look at higher order functions from the perspective of object orientated programming and how we can decouple our design using “function passing” (either directly in Ruby or via single abstract method interfaces in Java).

What stood out?

  • Exercise 2 introduces the neat little function juxt, definitely a good tool to know about and not a bad exercise either.

If you read nothing else this week…

  • Exercise 7 – 10 are brilliant practice of the Clojure we have learnt so far. Highly recommend everyone gives it a try as they are great for working on your code style and thinking about reducing duplication.
  • “9.5 Higher-order functions from the object-oriented perspective” – only two pages but makes you think about how you should handle your dependencies (on functions or on objects).
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: