Re:Show HN: Crafting Interpreters – A handbook for making pr...
by mafribe on Monday January 16, 2017 @10:17AM
(#13410394)
dearth of learning materials for things
like Hindley-Milner
What's wrong with the original paper [1]? It's really basic and boiled down to the essence (in true Milner style). I give it to all my students interested in typing systems as first paper. (There is a typo on Page 211.)[1] L. Damas, R. Milner, Principal type-schemes for functional programs.
Re:Show HN: Crafting Interpreters – A handbook for making pr...
by dsp1234 on Monday January 16, 2017 @03:07PM
(#13412580)
Eric Lippert[0] is doing an "excessive explanation" of this paper[1], where he breaks the entire paper down, line by line, with examples that C#/Java people would recognize. It's nice for people like myself who are strong on concepts, but weak on notation.
ex:
map : ∀α ∀β ((α → β) → (α list → β list))
Which I previously couldn't read, but I could easily explain the concept.[0] - Former C# language designer, Roslyn compiler team, etc.
https://www.reddit.com/r/programmerchat/comments/37qwmm/i_am...
Re:Show HN: Crafting Interpreters – A handbook for making pr...
by mafribe on Wednesday January 18, 2017 @06:28AM
(#13425612)
Thank you, that's an interesting point.
The thought that somebody would not be able to understand the type of map had not occurred to me, because I'm surrounded by people with a strong maths/FP background. Shows just how narrow-minded I am.
Add in a static typing, type inferencing, and type checking, and that all becomes much more complicated, at least from this learner's point of view. From how highly upvoted my comment is, I suspect I'm far from being alone here. Learning, understanding, and implementing Hindley-Milner by itself was harder for me than learning how to put together a basic interpreter for a simple scheme. And I think a big part of that is the dearth of learning materials for things like Hindley-Milner and related concepts, whereas there are 100 books and tutorials on how to implement a Scheme interpreter in language X.
Finally, if you're talking about language performance, then yes clearly it's much harder to squeeze performance out of dynamic languages. But I'm talking about learning exercises here, not production programming languages.