Hacker News new | comments | show | ask | jobs | submit login

You don't need Category Theory to tell you that there is a duality between structs and unions, any C programmer could tell you that.

Mind you I spent a lot of time working with Haskell in an academic environment and never understood the first thing about category theory. Especially those bloody diagrams that were supposed to be proofs.

It is entirely possible to understand functional programming and abstraction without understanding any category theory...




I disagree. I think that if you understand functional programming and abstraction, you understand a certain amount of Category Theory even if you don't know to call it "Category Theory".


Analogously, "you don't need maths to tell you that one and one is two."


As soon as you have an understanding that one and one is two, you have maths.


That's bait and switch. The question is whether people should study category theory to be better programmers. Not whether good programmers have intuitively mastered some category theory.


Not any C programmer could give an explicit, formal definition of "duality" and show how it applies to structs and unions. So yes, you do need category theory for that.


Besides, the duality is between structs and tagged unions, rather than C unions.


How do you know that it's entirely possible to understand functional programming without understanding category theory, when, by your own admission, you "never understood the first thing" about it?


How does he know it's entirely possible to understand A without understanding B, when he understood A, and never understood the first thing about B?

Not sure if joking.


What I mean is that it is objectively difficult to know that you understand A. How do you know that understanding B wouldn't give you a greater understanding of A?


He didn't claim that category theory couldn't possibly give him a greater understanding of functional programming.


If he'd claimed "I understand CT and it didn't help my understanding of FP in the slightest", I'd have no qualms. The problem I have is, what he's saying is essentially "I don't understand CT, but I'm having no problems with FP without it".

Here's an analogy. There's an apprentice carpenter who has been given some tools and as far as he is concerned the tools he has been given are all of the tools in existence. It's quite clear that if he was given a new tool, he could immediately establish whether it was useful or not. He could not establish, however, that he has access to every useful tool.

From his account, I don't know whether CT is like a hammer that he is using upside-down (needs explanation before it's useful) or a banana (never going to be useful to construct anything).


>what he's saying is essentially "I don't understand CT, but I'm having no problems with FP without it."

Saying that understanding category theory can give you a greater understanding of functional programming doesn't imply that a lack of understanding of category will cause problems in the understanding of functional programming.

Our difference is that I do not see anything in the thread parent that contradicts the article, and I don't think he's trying to convince you that CT is either a hammer or a banana, just that professional carpentry work is possible without it.


Then a greater understanding of FP is possible through understanding of CT.


That does not follow from my comment, which takes no stance, but is the thesis of the article.


You could also have some anonymous understanding of B. This reminds me of Richard Feynman's story about his dad and the bird.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: