How helpful is knowing lambda calculus? [closed]

The benefit of lambda calculus is that it’s an extremely simple model of computation that is equivalent to a Turing machine. But while a Turing machine is more like assembly language, lambda calculus is more a like a high-level language. And if you learn Church encodings that will help you learn the programming technique called …

Read more

Why are λ-calculus optimal evaluators able to compute big modular exponentiations without formulas?

The phenomenon comes from the amount of shared beta-reduction steps, which can be dramatically different in Haskell-style lazy evaluation (or usual call-by-value, which is not that far in this respect) and in Vuillemin-Lévy-Lamping-Kathail-Asperti-Guerrini-(et al…) “optimal” evaluation. This is a general feature, that is completely independent from the arithmetic formulas you could use in this particular …

Read more

Why is Haskell (GHC) so darn fast?

I agree with Dietrich Epp: it’s a combination of several things that make GHC fast. First and foremost, Haskell is very high-level. This enables the compiler to perform aggressive optimisations without breaking your code. Think about SQL. Now, when I write a SELECT statement, it might look like an imperative loop, but it isn’t. It …

Read more

What part of Hindley-Milner do you not understand?

The horizontal bar means that “[above] implies [below]”. If there are multiple expressions in [above], then consider them anded together; all of the [above] must be true in order to guarantee the [below]. : means has type ∈ means is in. (Likewise ∉ means “is not in”.) Γ is usually used to refer to an …

Read more