Does anyone have any non-Haskell example of category theory? Something that shows why is useful with a use-case.
>Some mathematicians are birds, others are frogs. Birds fly high in the air and survey broad vistas of mathematics out to the far horizon. They delight in concepts that unify our thinking and bring together diverse problems from different parts of the landscape. Frogs live in the mud below and see only the flowers that grow nearby. They delight in the details of particular objects, and they solve problems one at a time. Mathematics needs both birds and frogs. Mathematics is rich and beautiful because birds give it broad visions and frogs give it intricate details.
It is my impression that those loving category theory are predominantly birds. I am a frog, and never really got the love for category theory.
There is the theory of monotone co-design (https://co-design.science/index.html) which is formulated using category theory. It seems pretty practical.
Then there's topological data analysis, which is clearly a practical subject, and can be formulated in terms of category theory: https://en.wikipedia.org/wiki/Topological_data_analysis
I'm not very knowledgeful of any of these subjects, but I, like you, got somewhat interested in category theory and tried to find how and where it's used some time ago. These are the main things I found.
It's hard to say that category theory is "applied" to this or that problem. you'll hear many mathematicians call it "abstract nonsense" half-jokingly. More than anything it's a unified way of talking about mathematical structures that gives you a certain point of view (which is where it might be useful).
I'm personaly using category in the field of logic and language semantics (describing and proving stuff about notions of equivalence between programs, results like language X can interpret language Y with such and such fidelity). At a high level, i think category theory is useful in that realm because it enables to make up new structures (algebraic structures, think some set with operations and laws) which will be specific to you (won't be something well known like ring or whatever) but thanks to category theory you'll already have results on these structures because you'll show that they have some generic constructions.
In general category theory sometimes enables mathematical statements to drastically cut down on unimportant assumptions, getting at the real core of some theorem. By doing that, you're enabling other to reuse some result in settings which are "kinda similar", where "morally stuff work in the same way", but where the classical definition would have been too rigid.
edit: concretely about these generalizations: if you know about monoids, then look at https://en.wikipedia.org/wiki/Monoid_(category_theory) which is a categorification of it.
My personal opinion is that category theory's main contribution to computer science is aiding composability in strongly typed languages in a type-safe, elegant manner. In the end, software is about breaking down a problem into smaller pieces, implementing and testing them, and them putting the pieces back together. Concepts from category theory provide a rigorous foundation for such compositions.
Cambridge Quantum Computing and Honeywell Quantum Solutions recently merged to form Quantinuum. I work on the hardware side at Quantinuum. I don't actually use or apply Category Theory on a day to day basis but I know it is useful.
Unfortunately, that's also why most resources directly on category theory are deeply wedded to pure mathematics -- it's an architectural form that has been developed by mathematicians to organize their own constructions. Folks like Scott Wlaschin [0] and Mark Seemann [1] have, I think, much more success in teaching categorical concepts in a software context, but since their material is often so far removed from category theory "proper" (intentionally and for good reason), they don't really paint much of a path toward category theory themselves.
(I've recently been learning Agda, a dependently-typed language / proof assistant, and it's kind of shocking how often refactoring my proofs lead to more "obviously categorical" concepts. I really think there's something to this category-theory-as-mathematics-architecture angle.)
[2] http://blog.ezyang.com/2010/06/databases-are-categories/
I think you may find it helpful. It has a practical use case that builds up an intuitive model to a new monad. It goes through a few solutions for a stated problem which solve increasing requirements and eventually coalesces into writing a new monad as a complete solution to resolve all the built up requirements.
> I’ve never succeeded in understanding the slightest thing about it.
[0] https://golem.ph.utexas.edu/category/2010/08/what_is_the_lan...
Modern languages are our tools, and you can't use your tools effectively without understanding them, and you can understand them better by understanding their mathematical underpinnings.
-------------
Disregarding the comparatively more esoteric languages like Haskell, consider TypeScript, Rust, Haxe, and to an extent: Kotlin and Scala: you can take a self-taught (i.e. non-CS/SE graduate) programmer and eventually they'll figure their way through, and eventually grok, that languages' type-system - and hey-presto, you've just unwittingly taught someone something an entire course of graduate-level abstract mathematics would do, and been productive in the process.
Learning something becomes highly fun and enjoyable when the authors/lecturers are deliberately trying to make it so.
Most books on anything serves to document something and looks like accumulated notes that are an overt attempt to impress the authors' peers. There is no focus on actually teaching.
This book is not like that. This book focuses entirely on teaching, tries deliberately so that you can learn.
Some other books that I have come across in my life are:
1. Intro to Electrodynamics by Griffiths
2. High School Physics book by Halliday, Resnick, Walker.
3. ToC book by Sipser.
You get the idea.
Bob Coecke, Chief Scientist, Quantinuum.
On the other hand, I am very much enjoying How to Bake Pi by Eugenia Cheng, which is a few levels down in difficulty.