4 ms·
Yes, it doesn't at all seem right. After I learnt Haskell, I was forever wishing the languages I work in professionally had monads. But they're all strict lang
by squiggleblaz 8y ago
Yes, it doesn't at all seem right.
After I learnt Haskell, I was forever wishing the languages I work in professionally had monads. But they're all strict languages. Monads give us a nice consistent way of working with stuff inside generic wrapper types (e.g. nullable, arrays, classes and other partially applied functions, state machines, data paired with a world, partial functions converted into (more) total functions by tagging success and failed operations). My professional languages have different solutions for all of them and so it's harder to separate the rules and the mechanisms with heavy syntax
It's more that it's very convenient to think of side effecting functions operating on a world and returning a new one once you already have this powerful abstraction.
I like the fact that the type system encodes that the function has a side effect. But I don't particularly care that the language is lazy when I enjoy this benefit. They're quite independent.