Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The ironic thing about this post is, no actual category theory is used. Defining functions and functional composition laws is done (and is a perfectly natural thing to do), at the beginning of any undergrad math class. The definition of functions and composition laws was done more than a full century before category theory.

Category theory was invented for a deeper reason - to have a rigorous definition of a natural transformation, to enable a precise language to translate back and forth between algebra and topology.

Note that this is not a comment about the usefulness of category theory in theory of programming languages, it is about the uselessness of the linked article in talking about it.

As another commenter pointed out, in practice Haskell functions as values don't even form a category. This actually matters as illustrating the practical difficulties involved.

As a mathematician, I'd say most practicing computer scientists have a very skewed/warped understanding of category theory, and in their ignorance of other theoretical concepts, tend to misunderstand what they do think they know about. In general defining what you're trying to solve, tethered to a real, meaty problem, and then judging theoretical formulations for succeeding at these use cases is a good way to not get stuck in 'empty abstractions'. New mathematics gets invented (and judged) as a way of solving problems. The chain of reasoning might be long but it's there. People don't invent new terminology for no reason (and even if they did, and it didn't help for understanding a problem, it'd get no traction)



Did you read the entire post? Functions were only the first example to introduce the reader to the basic idea of associativity and identity. The post then discusses the Kleisli category and the category of coroutine pipelines.


I did read the entire post. Isomorphisms and homomorphisms between groups also obey associativity, identity, can be composed etc - but there is no point to talking about the 'category of groups', as opposed to, simply, Group theory unless I somewhere use the fact that it's a category, in say, talking about the topological spaces, and the fundamental group etc.

Did you read my comment? I claim that because something is associative and has identity, concepts clarified and used in the 19th century, is not sufficient motivation to bring about category theory. It's not used for anything in this article.


You are correct, but it seems a bit much to take the author to task about this. Isn't all that you ask for to replace the words "category theory" with "the notion of category" throughout the document?


A couple of comments:

Correct, it is not category "theory". The terminology "category theory" here is used analogously to how database people say relational algebra is based on "set theory". It sounds a bit silly to mathematical ears.

On the other hand, the article is about much more than composing functions. In fact the section headings are "The function category", "The Kleisli category", and "The Pipe category". The rudimentary structure of a category is useful for putting disparate concepts on common ground.




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

Search: