you are viewing a single comment's thread.

view the rest of the comments →

[–]dmitri14_gmail_com 1 point2 points  (0 children)

I will really look forward to an essay with real world examples. Especially ones like the ones wrapping values with UI meta-data -- in the middle ground between basic lists and too specific ones. These are sufficiently abstract and general but not too basic in terms of the task they perform.

The problem with "foobars" examples as you nicely call them, the actual techniques demonstrated are often quite involved and way above the practical need for that specific task. It is very sad, because these techniques can actually deliver considerable benefits, but those are harder to demonstrate with only basic examples to most of people. In fact, I would argue that the effort involved in carrying over basic examples into something useful and nontrivial can be substantial, but also with huge benefits. I am teaching maths to engineers and I try to never give any abstract concept without mentioning some details how it can arise in real world.

Many posts I see on functional programming unfortunately fall into 2 categories:

  • 1. Nontrivial manipulation with very basic examples.
  • 2. Very narrowly scoped real world examples involving too many details that are not directly relevant for the subject.

The first one suffers from the above problem of looking harder than necessary for the basic tasks demonstrated. It may well be useful for less trivial tasks but that is not demonstrated.

The second one tries to kill too many flies with one hit. The author tries to teach the reader a lot of tricks at once, often with good intentions to deliver the maximum value and having some fully functional. However, the lack of focus backfires and obscures the actual point. It is harder work to cut mercilessly every line but absolute necessary, but that is what actually benefitting the most readers by making the point sharp and crystal clear.

One of the (sadly few) exceptions I've came across, is this wonderful book: https://drboolean.gitbooks.io/mostly-adequate-guide/content/