3 ms·
I fail to learn Haskell about once every 5 years and sometimes I think of functional languages as not languages for expressing concepts, but more like a musical
by motohagiography 5y ago
I fail to learn Haskell about once every 5 years and sometimes I think of functional languages as not languages for expressing concepts, but more like a musical notation that denotes a set of abstractions mapped to an underlying ontology made from things you just train yourself on with practice - and then use the functional language as a lookup reference to until you can in effect "sight read," or compose those underlying elements to the page. The algebra and category theory are the true instrument, and the language is the composition notation tool. Whereas with OO and imperative programming, the imperative or OO language itself is the instrument or tool that you can just pick up and bang away on and music will come out. To extend the metaphor, OO is an instrument on which you can play a canon like "row your boat" without knowing how to write one, some, or all of them. It's lovely that we have these tools for specifying and composing functions, but perhaps the gap is in effectively expressing and teaching the underlying ontology. Maybe as a writer, my next attempt should be to write that explanation of it as I go.
The most trouble I had with Haskell was pronouncing statements after reading them, which prevented me from composing the ideas in my head because the syntax doesn't give you a lot of hints. It's like trying to parse calculus without names for the letters in the greek alphabet. Most people are proficient in their own written languages, and they are capable of mapping ideas to abstractions, but if there is not a way to express those ideas lexically in their language, most are going to stumble.
The incomplete and error prone explanations by novices that the author refers to also create an artificial conceptual barrier, but mostly because there is always the hint and implication (or perhaps just personal anxiety) that you are not writing real functional programs and that your naivety is accumulating a hidden sunk cost that you will eventually be exposed for and made ashamed of because you aren't a category theorist, which is a consequence of this mostly aesthetic idea that functional code is about competing to advance knowledge in a science and not just making stuff you enjoy or people like. The clostest thing I found to a kind of function-punk where you could just bang away on it because it was fun was the excellent Learnyouahaskellforgreatgood, but it focused on the notation less than the underlying ontology - e.g. the instrument - and what I think I might need is more of a category-punk that provides the equivalent to composition with a few concepts, and then add the notation to those.
Not sure there's another attempt in me, but anyway, provocative article about something so important, and that I think ultimately FP will really advance the way people think about the world, if only in another generation or two.