Whats the type system in Haskell like actually? I only know it's a functional language and there's like monads but never actually wrote any
Memes
Rules:
- Be civil and nice.
- Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.
Monads are the sole means of introducing side effects into a Haskell program; a pivotal rediscovery of a category-theoretical concept by the exceptionally talented Philip Wadler.
Any Haskeller will eventually become captivated by the immense power of a robust type system and the delightfully precise error messages that persist until everything functions flawlessly.
We tend to design our programs from the types outward, meticulously sculpting the potential outcomes and then crafting functions to seamlessly chain together these types. There is no concept of time (unless you’re into FRP), and everything remains immutable. Consequently, restoring any state from a complete shutdown is a seamless process, without any interruptions. Parallelism is essentially free because the same language enforced immutability also effortlessly facilitates parallelism.
However, I still desired more and reached for Singletons, Lenses, Templates, and Liquid Haskell, but they always felt unclean to me in the same way that pointers felt unclean in C.
That type system addiction eventually leads to languages like Agda, Idris, F Star, Coq, Lean, Racket, and many others that begin from scratch and further extend the type system.
Then, that type astronaut becomes interested in the dependent types world and realizes that it may be somewhat overly restrictive. Then our Haskeller realizes that perhaps, a language like Haskell is the perfect balance of pragmatism and a collection of modules created by brilliant individuals.
Furthermore, they are currently working on dependent types. Haskell with DT would be a world-beater.