Re:From Design Patterns to Category Theory (2017)
by mikorym on Tuesday June 11, 2019 @05:25AM
(#20153948)
My mathematical training is mainly from the category theory school of thought (more specifically the set theory inspiring category theory school of thought) and I have to say that I find it difficult to move from category theory to functional programming. I think it's because mathematics is more about a way of thinking than about the tools.
For example, reading category theory introductions meant for programmers to me is confusing, even though I know the mathematics already! I still need to get around to Milewski's book which looks to be dually useful as "functional programming for category theorists".
One way I'm thinking is to extract "patterns" automatically from their code. Then, it enables to write code review, give advises, pointers, find pattern duplication, common ground vocabulary... I'm sure structuring automatically the code from CT point of view can be helpful.
Disclaimer: Few years ago, I felt in love with theory category and more precisely the sketches (from Ehresmann). I linked Machine Learning and Category Theory [1] by automatically mapping data structure and algorithm definitions together (input/output and operations between) in order to be able to run any algorithm on any set of data. Then I introduced an heuristic based on Kolmogorov complexity to find the best model (algorithm output) to summarize the input data. Loved it !
[1] https://link.springer.com/content/pdf/10.1007/978-3-540-7497...