
Typed Functional Programming and Software Correctness - tiniuclx
https://dimjasevic.net/marko/2018/10/23/typed-functional-programming-and-software-correctness/
======
tiniuclx
I'm sure you've all heard Haskell programmers say that if their code compiles,
you can be sure the program is correct. I'd found that hard to believe until I
tried building something in Haskell: the type system lets you describe the
properties of your data and _behaviour_. When you compile, the theorem prover
inside GHC verifies that your code obeys the described properties.

This article does a good job of showing some flaws within the development
experience of mainstream languages as well as showing how a typed functional
languages can address them.

It does make me wonder why FP isn't more popular. Is it because of the high
level of abstraction? Sure, you need to learn what a monoid, or an functor is.
But once you do that, you can use the interface and behaviours described by
these categories to interact with _any_ other monoid / functor, no matter who
wrote it or what it achieves.

