Do you SHOF? Higher order functions in OO languages

If you live in the world of OO languages, you likely fall into one of two categories:

  1. You are still happily using inheritance, switch statements, nested if/else collections, have methods that are hundreds of lines long etc. You possibly haven’t heard of TDD or DI. There’s a very good chance that, if this is the case, you’ll likely never see this post as you likely do not read blogs by other developers.
  2. You do read around, you are aware of why inheritance, switch, deeply nested and long code blocks are frowned upon by the well-informed. You are at least aware of TDD, even if you haven’t quite started using it yet. Also, you are likely aware of the growing excitement around functional languages and perhaps look on with envy at some of their features. If this is you, you possibly already use SHOF’s without knowing it.

Continue reading “Do you SHOF? Higher order functions in OO languages”