An interesting write up and examples of using a odd math in the day to day programming world. Fun stuff!
How much of category theory knowledge should a working programmer have ? I guess this depends on what kind of language the programmer uses in his daily life. Given the proliferation of functional languages today, specifically typed functional languages (Haskell, Scala etc.) that embeds the typed lambda calculus in some form or the other, the question looks relevant to me. And apparently to a few others as well. In one of his courses on Category Theory, Graham Hutton mentioned the following points when talking about the usefulness of the theory :
- Building bridges—exploring relationships between various mathematical objects, e.g., Products and Function
- Unifying ideas - abstracting from unnecessary details to give general definitions and results, e.g., Functors
- High level language - focusing on how things behave rather than what their implementation details are e.g. specification vs implementation
- Type safety - using types to ensure that things are combined only in sensible ways e.g. (f: A -> B g: B -> C) => (g o f: A -> C)
- Equational proofs—performing proofs in a purely equational style of reasoning