3 ms·
Well, as you might know, there is a classic talk on YouTube in which SPJ half-jokes about religious zeal of purity in Haskell, to avoid "sins" of side effects a
by johndoe42377 6y ago
Well, as you might know, there is a classic talk on YouTube in which SPJ half-jokes about religious zeal of purity in Haskell, to avoid "sins" of side effects as only religions purists might do.
It is actually very clever and even beautiful analogy, because if there is anything good about any organized religion it is self-discipline and principle-guided minimalism.
Haskell - the language defined in the Haskell report - desugars into pure Lambda Calculus (augmented with a few extra expressions and types), strongly typed with type-classes. This is based on logical formalism which is called System F omega.
On the implementation side this core language is nothing but pure substitution, beta reduction and a few additional evaluation rules.
As long as it is being keept this way Haskell's core language is a pure logic. Technically and conceptually. It just is.
The result of the main function is a pure math-like expression to be executed by the runtime which is linked into each executable. The expression is still pure, as math or logic, while runtime is impure and is doing all mundane sinful mutations.
Sounds spooky, but this is how Haskell works, and these actual characteristics make it unique, of its own kind, a miracle if you wish.
The problem with HN, by the way, that normies with swarm here do not even understand what other people are talking about. They downvote because they feel silly.
- deleted 6y ago[deleted]
- AnimalMuppet 6y agoNo, we downvote because you act like a jerk. If you want to talk to people here, lose the attitude. For example: "normies". Yeah, you don't actually need to use putdowns to communicate. If you're going to be on HN, don't do that.
- johndoe42377 6y agoBy restricting a form of expression you ruin the art of communication.