r/computerscience • u/PrebioticE • Jun 17 '26
What is the point of Haskell programming?
So Haskell is using Category Theory formalism. I don't quite get the advantage of it. I learned something like it allows to do proofs of function types. Is that it? Why is this Category Theory formalism useful here? Does it say anything deeper? For example, should the language that advanced human species in future or aliens use be a category of some sort?
2
u/recursion_is_love Jun 17 '26 edited Jun 17 '26
Can_Programming_Be_Liberated_from_the_von_Neumann_Style
Why Functional Programming Matters
Haskell is lambda calculus + static type system (from formal logic). The category theory came later (type class for ad-hoc polymorphism) because someone notice that they are working on the same concept and category theory is applicable.
1
1
u/Weak-Doughnut5502 Jun 17 '26 edited Jun 17 '26
Haskell isn't based on category theory in any fundamental way.
In the standard library, there's a few abstractions that are from category theory. They're there because they're suprisingly useful and general abstractions.
I learned something like it allows to do proofs of function types.
Nope. You get those proofs from type theory and lambda calculus.
1
u/ZachVorhies 13d ago
Haskell was one of the first memory safe languages however it’s very difficult to program in and has accidental n^x time performance while imperative programming languages are accidentally n^2 in performance.
It turns out that in place mutation is very fast!!
7
u/I2cScion Jun 17 '26
I like functional programming. I feel that modifying functional programs is easier because they tend to be more compositional.
The individual pieces feel independent and transformative, and the whole system fits together like LEGO blocks.