HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Essentials of Programming Languages (The MIT Press)

Daniel P. Friedman · 5 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Essentials of Programming Languages (The MIT Press)" by Daniel P. Friedman.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
A new edition of a textbook that provides students with a deep, working understanding of the essential concepts of programming languages, completely revised, with significant new material. This book provides students with a deep, working understanding of the essential concepts of programming languages. Most of these essentials relate to the semantics, or meaning, of program elements, and the text uses interpreters (short programs that directly analyze an abstract representation of the program text) to express the semantics of many essential language elements in a way that is both clear and executable. The approach is both analytical and hands-on. The book provides views of programming languages using widely varying levels of abstraction, maintaining a clear connection between the high-level and low-level views. Exercises are a vital part of the text and are scattered throughout; the text explains the key concepts, and the exercises explore alternative designs and other issues. The complete Scheme code for all the interpreters and analyzers in the book can be found online through The MIT Press web site. For this new edition, each chapter has been revised and many new exercises have been added. Significant additions have been made to the text, including completely new chapters on modules and continuation-passing style. Essentials of Programming Languages can be used for both graduate and undergraduate courses, and for continuing education courses for programmers.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
Jul 10, 2018 · s-shellfish on Crafting Interpreters
My interpreters course used this book, as well as 'the little schemer'. They follow a lot of conventions that I find really useful for software development (various intricacies of languages in active development tend to follow the same conventions of diagramming, labeling, notation, etc - all really important things to keep standard when reasoning about, teaching, and explaining programming languages!)

https://www.amazon.com/Essentials-Programming-Languages-MIT-...

https://github.com/mwand/eopl3

https://mitpress.mit.edu/books/little-schemer-fourth-edition

There's also this book that from my understanding, a lot of people consider fairly foundational / useful (own it, haven't read it)

https://mitpress.mit.edu/sites/default/files/sicp/index.html

You should definitely study parsers and compilers. The biggest gains for me have come from studying parser, compilers, VMs, and functional languages. The data structures and algorithms you sort of pick up along the way as you study the previously mentioned topics. For a really nice way to get started with all that stuff I highly recommend PL101 course at http://nathansuniversity.com/. It is a set of guided exercises for designing and implementing various programming languages all in your browser. That's actually how I started learning all this stuff.

If after going through the lessons from PL101 you decide that stuff is interesting to you then another book that I highly recommend is "Compiler Design: Virtual Machines": http://www.amazon.com/Compiler-Design-Machines-Reinhard-Wilh.... That one goes through various virtual machine implementations and by the end of it you'll understand precisely how pointers, stacks, arrays, etc. all work in various programming languages. Another good book is "Essentials of Programming Languages": http://www.amazon.com/Essentials-Programming-Languages-Danie... but I haven't put enough time into that one to say whether it will benefit you or not.

If the previously mentioned online resources and books are not your cup of tea then another good way to exercise your programming muscles while learning about data structures and various program organization principles is to implement a simple project like a ray tracer or a recursive descent parser in different languages. Start with a language you are fluent in and then diversify from there. This is actually how I learn programming languages and having a clear goal in sight is an excellent motivator for exploring all the new concepts in whatever language I'm learning.

Paying to learn at this point is a waste of money in my opinion. If you are comfortable learning stuff on your own then there is no shortage of resources available on the internet. All it takes is some discipline to follow through.

This is a simplistic restatement (on a rather ugly webpage color scheme) of the strong version of the linguistic relativity hypothesis ("Sapir-Whorf hypothesis"), which is surely wrong. My native language is General American English, and I grew up in what was essentially a monolingual immediate family and neighborhood of English speakers, although both of my parents had had some instruction in other languages. All of my grandparents were born in the United States, but three of the four spoke languages other than English at home, and my two maternal grandparents had all of their schooling in German.

German as a second language was mandatory for all elementary pupils in fourth, fifth, and sixth grade in my childhood school district, very unusual for the United States. I had more German in junior high and senior high (in two different states) and then Russian in senior high. I entered university as a Russian major and immediately began taking Chinese, switching my major to Chinese as I grew in delight for that language. I have had formal instruction as an adult in Modern Standard Chinese (a.k.a. Mandarin), Cantonese, Biblical Hebrew, Literary Chinese, Attic Greek, Biblical Greek, Japanese (first in the medium of Chinese, then in English), Taiwanese, and Hakka, and various courses in linguistics (also in the mediums of both English and Chinese). I have engaged in self-study of Biblical Aramaic, Mongolian, Spanish, French, Latin, Hungarian, Malay-Indonesian, Esperanto, Interlingua, etc., etc., etc.

I have to respectfully disagree with the strong version of the linguistic relativity hypothesis. Within each language grouping, people differ far more in their personal thinking along the dimension of visual thinker or not, or auditory thinker or not, than people differ from one another in thought patterns based on language background. But it is useful to learn another language and to live in another culture for exposure to new basic assumptions, and the same applies to learning computer language paradigms. People who program for a living, or who program just for fun, may like the books

http://www.amazon.com/Programming-Language-Pragmatics-Third-...

or

http://www.amazon.com/Essentials-Programming-Languages-Danie...

among other books on programming languages mentioned here on HN as examples of overviews of different approaches to high-level computer programming languages facilitating different kinds of programming problem-solving.

The case of human languages is quite a bit different. All human languages are constrained by the biology of the human brain, and human ear and human vocal tract (or hands and arms, in the case of sign languages for the deaf), and all human languages, without exception and even if they are constructed languages, have ambiguities and illogical features inconsistent with other features of the language. Many of the faults of Esperanto are very well documented,

http://www.xibalba.demon.co.uk/jbr/ranto/

and the Lojban promoters I have met online since 1994 have repeatedly demonstrated lack of logical capacity (at least in our common language of English) in a manner that puts me off from learning Lojban.

Learning a new cultural perspective by living in a new culture and learning the predominant language there is a very good idea, and highly educational. But the incidental features of one language as contrasted with another have no necessary relationship to how speakers of each language think, or how they can think.

httpitis
I'm impressed by your vast experience with different languages! I'm also curious to learn why one language contrasted with another language have no necessary relationship to how speakers of each language think. The authors post seem to prove the opposite:

>An Australian Aboriginal tribe, The Guugu Yimithirr, famously have no words for left, right, in front of or behind. They use north, east, west, and south instead. And as a result: they develop an internal compass—always knowing which way is north, even if you blindfold them and spin them around.

I for sure don't know the direction after being spun blindfolded :)

(edit: grammar)

seanos
It may be possible that they developed their internal compass due to their nomadic lifestyle and the use of absolute directions within language resulted from that (rather than vice versa). I have no idea if this is the case.
jkn
Seems unlikely to me: there are many nomadic tribes, but this linguistic particularity and these abilities in spatial orientation were only reported for this tribe (AFAIK).
klenwell
According to the professor on whose research this information is based, a third of the world's languages have this linguistic peculiarity.

You can hear her account around 30 minute mark of this RadioLab episode: http://www.radiolab.org/2011/jan/25/birds-eye-view/

jkn
Can't listen to it right now, but this article:

http://online.wsj.com/article/SB1000142405274870346730457538...

suggests that speakers of all these languages share the good spatial orientation abilities. Anyway it's true then that my argument doesn't hold. One should first verify if there is a subset of nomadic peoples that lack this language feature, and that they have poorer orientation abilities.

klenwell
Heard this story on RadioLab recently. Very interesting but it's hard to see how language itself was the mechanism behind their unusually sensitive internal compass.

More like they're acutely sensitive to external cues like their shadow (position of the sun) and other subtle details of the landscape. Their language just seems to reinforce that more subliminal attentiveness to these cues.

I found this to be one of the more interesting points made in the RadioLab story: while the majority of the limited number of modern languages in use today do not have this spatial-directional feature, it seems to have been a feature of a large number of the languages that have ever existed. (Edit: per Dr. Lera Boroditsky [great website: http://www-psych.stanford.edu/~lera/], it's a third of the world's (current?) languages, though not speakers.)

Which makes sense. Imagine our unsettled, migratory ancestors trying to keep their bearings without the aid of compasses or standardized maps. One of the first features you'd probably ask for in your language is a feature that helps you keep track of your approximate location.

Radiolab link: http://www.radiolab.org/2011/jan/25/birds-eye-view/

jkn
More like they're acutely sensitive to external cues like their shadow (position of the sun) and other subtle details of the landscape.

That's confusing how they achieve it (the cues) with why they developed the ability (need to know for proper communication, maybe for the reason you mention).

jkn
You fail to address the point of the New York Times story referenced in the original post: There is a tribe that uses cardinal directions all the time, instead of left, right, front and back, and it does have a big effect on their spatial orientation abilities. This looks like an example where the Sapir-Whorf hypothesis applies. One example, that's all it takes to prove that the phenomenon exists.

So the OP might very well be right: maybe we can hack our minds to get new abilities simply by changing our language. Maybe not much beyond this spatial orientation example, but who knows...

Radix
Using cardinal directions really isn't a strong feature of the language though is it? It's secondary to the language itself and any culture could do that with their own language because it isn't a central feature of the language. It isn't in the grammar. Which makes it not an example of strong Sapir-Whorf but an example of weak Sapir-Whorf. The former is all token adult claimed and the latter is something that is, I think, more accepted.
jkn
Ah, thanks for the correction.
fusiongyro
Wow.

Regarding constructed languages, I like Interlingua the best, but nobody knows it. It certainly appears to me to be both easy to learn and productive, but I'm very poor at it. I tried Esperanto a while back, but didn't like it.

Lojban, I think, is great fodder for science fiction. Unfortunately, the language was designed without any real interest in how the human brain processes language. It's full of wizzy tricks and neat stuff, and I like the idea of it, but it seems to resist being learned. When I was last looking into it ~2 years ago, there had essentially been one actual conversation in it, and there was reason to suspect the participants were talking past each other. I do think one could create an actual language from Lojban, but it would have to have a really restricted subset of the grammar.

Anyway, thanks for your insights. I often wish I had put the energy into human languages I put into programming languages.

You received another interesting answer. My native language is General American English, and I grew up in what was essentially a monolingual immediate family and neighborhood of English speakers, although both of my parents had had some instruction in other languages. All of my grandparents were born in the United States, but three of the four spoke languages other than English at home, and my two maternal grandparents had all of their schooling in German.

German as a second language was mandatory for all elementary pupils in fourth, fifth, and sixth grade in my childhood school district, very unusual for the United States. I had more German in junior high and senior high (in two different states) and then Russian in senior high. I entered university as a Russian major and immediately began taking Chinese, switching my major to Chinese as I grew in delight for that language. I have had formal instruction as an adult in Modern Standard Chinese (a.k.a. Mandarin), Cantonese, Biblical Hebrew, Literary Chinese, Attic Greek, Biblical Hebrew, Japanese (first in the medium of Chinese, then in English), Taiwanese, and Hakka, and various courses in linguistics (also in the mediums of both English and Chinese). I have engaged in self-study of Biblical Aramaic, Mongolian, Spanish, French, Latin, Hungarian, Malay-Indonesian, Esperanto, Interlingua, etc., etc., etc.

I have to respectfully disagree with the strong version of the linguistic relativity hypothesis. Within each language grouping, people differ far more in their personal thinking along the dimension of visual thinker or not, or auditory thinker or not, than people differ from one another in thought patterns based on language background. But it is useful to learn another language and to live in another culture for exposure to new basic assumptions, and the same applies to learning computer language paradigms. Besides the book mentioned in another reply, I like the books

http://www.amazon.com/Programming-Language-Pragmatics-Third-...

http://www.amazon.com/Essentials-Programming-Languages-Danie...

too as overviews of various programming languages.

jimbokun
Those look like two fun books to read. Thanks for the links.
This is the 2nd edition: there's a new edition out now. http://www.amazon.com/Essentials-Programming-Languages-Danie...

I have no idea what's changed.

HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.