HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Programming Language Pragmatics

Michael L. Scott · 9 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Programming Language Pragmatics" by Michael L. Scott.
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
Programming Language Pragmatics, Third Edition, is the most comprehensive programming language book available today. Taking the perspective that language design and implementation are tightly interconnected and that neither can be fully understood in isolation, this critically acclaimed and bestselling book has been thoroughly updated to cover the most recent developments in programming language design, inclouding Java 6 and 7, C++0X, C# 3.0, F#, Fortran 2003 and 2008, Ada 2005, and Scheme R6RS. A new chapter on run-time program management covers virtual machines, managed code, just-in-time and dynamic compilation, reflection, binary translation and rewriting, mobile code, sandboxing, and debugging and program analysis tools. Over 800 numbered examples are provided to help the reader quickly cross-reference and access content. This text is designed for undergraduate Computer Science students, programmers, and systems and software engineers.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
Programming Language Pragmatics by Michael Scott

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

I haven't read a lot of language books, but this one has good information on the various design choices one might make when building a language. Like the others listed in the comments, it's more implementation-focused than semantic design-focused.

sdegutis
Huh. This is the only book recommended so far that only has good Amazon reviews. I think it may be a winner. But honestly it's so hard to judge a book by its cover, or even by Amazon reviews (even though some of them seem to make really good points).
If you are serious about programming and have any possibility of doing this at all, by all means get a CS degree at the best university you can access. I have worked with or interviewed a few programmers without any university degree and time and time again their confidence in how getting a degree is a total waste of time was directly proportional to their ignorance of basic facts from various areas of CS and inability to solve problems in a systematic way.

A lot of those people simply never get any external validation, have problems getting along with other people, and are unable to accept any kind of mentoring (while they desperately need it), in the end growing up believing in the greatness of their skills which in reality are not even mediocre. Since this seems to be the reason a large fraction of people does not finish their degrees, by this point as a recruiter I would just not hire a person without a degree.

For this reason, I would also ignore a lot of the testimonies that invariably will appear here of self-taught programmers proclaiming supposedly doing great, unless they have projects and code to back their claims up.

There certainly are exceptions, but do not start with the belief you will be one. Getting the same kind of wide perspective you get from a college degree from self-studying is several times as hard. I have self-studied mathematics after finishing my CS degree for a few years now and that's my practical experience. If you don't have the possibility to attend university, make sure to get as many opportunities as possible of verifying and testing your skills in different areas and stay modest.

This post by Notch of Minecraft fame illustrates all that I have said very well:

http://notch.tumblr.com/post/15782716917/coding-skill-and-th...

As far as practical advice goes, as soon as you are able to at all write working programs of non-trivial complexity (say, a platform game) MIT OCW is the place to be:

http://ocw.mit.edu/courses/electrical-engineering-and-comput...

http://ocw.mit.edu/courses/electrical-engineering-and-comput...

http://ocw.mit.edu/courses/electrical-engineering-and-comput...

http://ocw.mit.edu/courses/electrical-engineering-and-comput...

Taking those four courses in this order will provide a great basis, but I would be surprised if someone would be able to complete those in less than two years when self studying (I solved most exercises from SICP, learned a lot, but took me more than a year). To get the equivalent of a university degree, you would still need to heavily study at least four more topics: networking & security, compilers, operating systems and databases. Those two books might be a reasonable shortcut to learn some of this:

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

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

Source: I started working full-time as a developer when I was 19 and did it ever since, did a four year CS degree as evening studies after work (already having significant programming experience when starting the degree) and spent a significant amount of time self-studying (I worked through almost all of SICP, read the "Dragon Book", wrote a compiler etc.). I would never be where I am today (wherever it is) without teachers and colleagues from the university, there would be just lots and lots of gaps in my knowledge I would never get aware of.

EpicEng
On the other hand, I have come into contact with hundreds of programmers with CS degrees who were simply inept. It goes both ways.
grumps
I've been really considering a 2nd BS in CS at times, but just can't seem to get myself to do it. I have BS in engineering, but not CS. I get fustrated because of what would be required for a MS in it, and some schools the time for a 2nd BS is just out of control for myself.

I also see myself being in more management of programmers at sometime. It's pretty rare for me to trivialization a solution process. I've done it, but so has everyone. Making mistakes is the learning process.

bliti
The older I get, the more I agree with your point. That's why I'm planning to complete a bachelors degree in CS, IT, or CE. It does make a difference.
phaus
Both links to Amazon go to the same book. What was the other book that you were suggesting?
stiff
Oops!

http://www.amazon.com/Computer-Systems-Programmers-Perspecti...

phaus
Thanks. I'm still in the phase where I can't build anything non-trivial, except for simple web applications.

When I'm ready, I plan to start studying these resources.

stiff
6.00 from MIT and the Udacity courses about CS/programming might help bring you up to speed, and 6.00 is periodically offered at edx as a full online course. Wish you luck!
vicaya
"by this point as a recruiter I would just not hire a person without a degree"

While the variability of self-taught is higher than those with a CS degree, there are plenty of self-taught (without CS degree) software engineers who rise to the top of hard core software engineering companies (e.g. Microsoft, Facebook, VMware etc.), besides high-profile college drop-outs like Bill Gates and Mark Zuckerberg.

I suspect that your recruiter position expose you to lower than average quality candidates, as most good engineers never needed a recruiter -- they are simply referred by their friends and colleagues.

ekm2
While the variability of self-taught is higher than those with a CS degree, there are plenty of self-taught (without CS degree) software engineers who rise to the top of hard core software engineering companies (e.g. Microsoft, Facebook, VMware etc.), besides high-profile college drop-outs like Bill Gates and Mark Zuckerberg.

I am not sure if Mark Zuckerberg can be described as self taught,especially if you consider his high school's CS curriculum.

http://www.exeter.edu/documents/COI/COI_Final_2013_14.pdf#pa...

What helps immensely in learning new programming languages quickly, but also in spotting tricky bugs and increasing general software engineering skills is studying programming languages as a discipline of CS: learning how languages are implemented, what are the core paradigms, what are the design choices invented so far for common issues etc. There is a fantastic book called "Programming Language Pragmatics" that is readable and very good in teaching the practical aspects of this:

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

mjburgess
Exactly. All you really need to know is how to accomplish things in functional, OO and procedural languages. The advice given in the article is very nearly syntax based, not conceptual. Which is nearly useless if you're going very far from C/++.

If you're in a procedural language the questions is: what's the for-loop?

If you're in an OO language: are there iterators, how do I use them?

If you're in a functional language: what the syntax for mapping, etc.

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.

There's a book called "Programming Language Pragmatics", which is a very readable presentation of PL ideas, how to parse them and how to write compilers for them. I actually read 2/3 of it.

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

nickik
This is one of the very few (tech) books I read cover to cover (plus the stuff chapters on disk). If you are intressted in everything from machine up to programming language this is the book for you.
achompas
So happy to see Scott get a bit of recognition on HN. This was my graduate PL text last semester, and I enjoyed reading it before class every week.

As a clear, well-written, thorough text on PL, I can't recommend it more strongly.

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.
I recommend _Programming Language Pragmatics_ by Michael Scott as a good book to get you started: http://www.amazon.com/Programming-Language-Pragmatics-Third-...
jwdunne
Much appreciated!
Programming Language Pragmatics by Michael L. Scott: The explanations of many things I'd read in other sources are no less than fantastic, I now understand a bunch of things I had only superficially "got" previously. http://www.amazon.com/Programming-Language-Pragmatics-Third-..., check out the overview and reviews.

Coders at Work by Peter Seibel: By far the best of this type of book (well, not counting the '80s classic Programmers at Work which I haven't read since then), one of the best Lisp authors interviews in depth a lot of really interesting and/or important people, from James Zawinski to Donald Knuth, with Javascript, static FP and PARC people, Guy Steele, Peter Norvig, Ken Thompson, Fran Allen (really important interview which points out how C/C++ to the exclusion of truly high level languages have been a disaster when used beyond their proper niches), etc. All are masters who've gotten their hands dirty, many are theory people as well. http://www.amazon.com/Coders-at-Work-Peter-Seibel/dp/1430219...

Garbage Collection by Jones Lins: Pretty much the only book in the field (except for the forthcoming Advanced Garbage Collection sequel in the middle of this year), covers the territory as of the mid-90s. Much more fun than trying to track down 100 individual papers and trying to make sense of it all. Exposition is clear and you get a real feeling for the subtleties of the field (especially when you try fun things like generational and/or concurrent GC). http://www.amazon.com/Garbage-Collection-Algorithms-Automati...

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.