
So you still don't understand Hindley-Milner? (2013) - mpgirro
http://akgupta.ca/blog/2013/05/14/so-you-still-dont-understand-hindley-milner/
======
cwzwarich
This is probably my favorite explanation of HM type inference, based on an
analogy with region-based memory management:
[http://okmij.org/ftp/ML/generalization.html](http://okmij.org/ftp/ML/generalization.html)

~~~
nickpsecurity
That looked a bit rough in comparison but with plenty of detail. I'll add that
one too. Thanks.

------
proc0
Well, that was enlightening actually. Thanks for posting.

~~~
qb45
Not quite sure who is downvoting that. Looks like a decent article for people
who aren't like "yeah, nothing new here" after seeing the first diagram.

edit: wtf, I love you people.

------
nickpsecurity
Love the step by step approach connecting English and intuition to the more
formal and theoretical stuff. Not ready to learn this stuff but Hindley-Milner
is on my TODO list later. I can tell by first page that this will help a lot
given the math looks like gibberish to me.

Note: Strange I did great in Algebra, Calculus, etc back in H.S. and college
but proofs and such look gibberish. Maybe I should've taken a class with set
theory or formal logic, eh? Paying for it now as I skim formal methods & FP
papers...

~~~
tamana
It is a formal notation for logic that is nothing particularly like algebra.
(The horizontal bar is not division, the turnstile is not a binary operation.)
It's a new "syntax of symbols" that you need to learn to read in order to read
logic papers.

------
conceit
Well, the terse notation is indeed to terse for me, and I'm not even sure what
I'm trying to understand, but the explanation on the other hand is too long.

What's the null element of the set of expressions? Is (\lambda x. ) not valid
and applicable?

------
tamana
Why is the capital gamma spammed into all the formulas, instead of adding an
axiom

    
    
        foo turnstile bar
    
        ------------------------
        Gamma, foo turnsile bar

~~~
fanf2
Γ is a shorthand for the rest of the type environment. Your suggestion would
allow the type checker to invent arbitrary phantom declarations.

