3 ms·
This graphical notation for linear algebra isn't like the usual diagram notation category theory at all. > Is category theory a useful organizational tool in c
by siraben 6y ago
This graphical notation for linear algebra isn't like the usual diagram notation category theory at all.
> Is category theory a useful organizational tool in certain abstract branches of mathematics?
Yes. Abstracting math in a very general way lets you explore patterns and a result in category theory (e.g. Yoneda lemma) generalizes immediately to other instances of categories.
> I also find any claims that category theory is relevant to the average working programmer to be dubious at best.
I would say there is value in knowing some category theory, especially if the programmer is working in a strongly-typed functional language. Knowing what a functor is, what a catamorphism is and so on, can be useful ways to write more declarative code and teach about abstractions in the same way OOP uses Design Patterns to teach programmers about reusuable code.
- spekcular 6y agoI realize that, obviously, that the diagrams presented in this article are different from the ones found in category theory textbooks. Moreover, my later comments were not really aimed at this article so much as others that are posted here. The criticisms just happen to fit this article, too. Also, I don't really see how learning the abstract definition of a functor is going to help someone write better OCaml programs. But it is possible I am just not imaginative enough. Do you have a concrete example of this?
- siraben 6y ago> But it is possible I am just not imaginative enough. Do you have a concrete example of this? Well, in the case of functor it's not terribly interesting, but here's an example. A functor F has the property F g . F h = F (g . h), so this means that if you were writing map f (map g l) you could write map (f . g) l instead, (in Haskell the compiler optimizes it anyway) but if your compiler actually traversed the list twice, now it traverses the list once. I could list other things like how monoids, monads, etc. can help make programs more efficient (monoids allow exponentiation with squaring) or structure programs better (monads allow composition of partial/stateful/exceptional functions).
- ogogmad 6y agoYour example for the application of the "functor" concept is trivial enough that it doesn't need category theory. Monoids are very simple objects, and you don't need to use category theory to define them. Monads might be a more meaty example. But I'm not sure if knowing CT makes it easier to use monads in a programming context.
- siraben 6y agoThey're trivial constructions yes. But the difference is the shift in vocabulary, instead of understanding functor fusion in an ad-hoc way, the concept can be made more precise, also it can lead you to find other "non-trivial" functors for instance the Hom(a,-) covariant functor or the Hom(-,a), but equipped with the right vocabulary these things are easy to express. Sure, monoids are trivial, because they are, but once you're in the categorical setting you can begin to talk about the category of monoids, monoid homomorphisms and so on. This isn't to say that CT is the answer, but I'm pointing out that it provides a way to understand more complicated concepts. Functors are trivial, but if you take their fixpoint you get ADTs. Monoids are trivial, but if you apply them to the category of endofunctor you derive monads, and so on.
- tome 6y ago> Your example for the application of the "functor" concept is trivial enough that it doesn't need category theory. That's kind of the point. > "Perhaps the purpose of categorical algebra is to show that which is trivial is trivially trivial." That is, category theory aids in making the softer bits of mathematics look utterly natural and obvious, so that one can more easily isolate the harder nuggets and attack them with abandon ... This is a tremendous service that category theory provides" https://mathoverflow.net/questions/28788/nontrivial-theorems-with-trivial-proofs#comment172290_28797 https://mathoverflow.net/questions/28788/nontrivial-theorems... In isolation applications of category theory to programming are going to be trivial, typically. Category theory gives a language and framework for extracting trivialities so one can "attack the harder nuggets" without distraction.