
Essentials of Programming Languages - gjvc
http://eopl3.com/
======
jasperry
I was a TA for a programming languages course taught using this book, and it
was one of the most enlightening experiences I've had: Implementing
interpreters in Scheme to learn about recursion, environments, closures,
objects, continuations. I think of it kind of as the dual of a course on
developing a compiler for a static languages.

~~~
pcstl
Do you know of any good courses on developing compilers for static languages?

~~~
dochtman
I took Aiken's Stanford Compilers course on Coursera and wrote about it:

[https://dirkjan.ochtman.nl/writing/2012/07/21/compilers-
on-c...](https://dirkjan.ochtman.nl/writing/2012/07/21/compilers-on-
coursera.html)

~~~
apricot
I can't seem to find that course on Coursera; was it removed?

~~~
Flow
I think they moved from Coursera to Stanford's own platform.

[http://openclassroom.stanford.edu/MainFolder/DocumentPage.ph...](http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=Compilers&doc=docs/slides.html)

~~~
apricot
Thanks!

------
kesava
Dr.Racket has a `#lang eopl` to support the second/third editions:
[https://docs.racket-lang.org/eopl/index.html](https://docs.racket-
lang.org/eopl/index.html) The first edition seems to build a tower of
abstractions gradually, than directly jumping into the deep end of the pool.
But getting code from first edition to run on Dr.Racket is quite a trouble.
Can someone well versed with Racket macros, please write `define-record` to
work with `#lang eopl`? I can figure out the macros with some effort, but cant
quite figure out how to extend an existing lang.

~~~
soegaard
Just tested and `(require foo)` works fine in `#lang eopl`. That is, if you
define `define-macro` and put it in package, say, `eopl1`, then you can use

    
    
        #lang eopl
        (require eopl1)

~~~
kesava
Thank you for that pointer. I have been trying a few approaches but hit a
serious wall. I have a write up on what I tried so far. Could you please take
a look and give me some pointers/feedback? Thanks in advance!
[https://gist.github.com/kesava/ec1518495387928d35ec9fc5a764d...](https://gist.github.com/kesava/ec1518495387928d35ec9fc5a764ddbf)

------
siraben
I read EOPL independently in high school, and I thoroughly enjoyed it because
it had a good balance between theory and practice. I would consider Types and
Programming Languages to be theory-based, EOPL in the middle and SICP to be
practice-based. (My personal order was SICP -> EOPL -> TAPL)

It's a great exercise to implement[0] the languages from EOPL. I think it fits
a lot better in a statically typed language like Haskell (the parsing can be
done with parser combinators), since they essentially have to re-create ADTs
with macros in Scheme, when they could be easily embedded into the host
language. The effectful interpreters could have their effects encapsulated in
a monad transformer stack.

[0] [https://github.com/siraben/eopl](https://github.com/siraben/eopl)

~~~
dependenttypes
I would also suggest "Concepts, Techniques, and Models of Computer
Programming", "How to Design Programs" (second edition:
[https://htdp.org/2020-8-1/Book/index.html](https://htdp.org/2020-8-1/Book/index.html)),
and the books in "The little X" series (such as The little schemer).

------
saxonww
The MIT Press site implies there might be a Kindle edition for this, but the
Amazon store page doesn't mention one. It also offers etextbook rental, but
the link goes to a page with no options for that afaict. I see where there are
epubs offered online for prior editions, but they look sketchy. Is this
textbook legitimately available in any ebook format?

~~~
jagged-chisel
I get a 404 on the MIT Press link. What link did you use?

Edit: Visiting MIT Press and searching finds this[1], and I also cannot find a
single digital option for this book.

1 - [https://mitpress.mit.edu/books/essentials-programming-
langua...](https://mitpress.mit.edu/books/essentials-programming-languages-
third-edition)

------
systems
between this book and Programming Language Pragmatics ( Michael Scott ), which
is the better book ? (the are both very expensive, I can only afford one, if
there is another less expensive and just as good or better option, please
recommend)

~~~
kesava
A used first edition of EOPL is way cheaper and far better in developing the
subject matter than the latter versions. There is even a chapter on Type
checking and interference: ftp://ftp.cs.indiana.edu/pub/techreports/TR491.pdf

~~~
abecedarius
The way I'd put it is that later editions are more focused on classroom use,
while the first edition felt closer to my interests as a hacker. The later
editions do have many improvements like a nicer development of the CPS
transformation, but they also dropped the chapter on compiling by transforming
an interpreter, and so on.

~~~
bmitc
This is curious to me. Because I first bought the 3rd and latest edition of
this book, as you do, but then I read reviews that the 2nd edition was
superior. So I picked up the 2nd edition since I saw it for a cheap price
used. Now, here I am reading that the 1st edition is better. Haha.

What would you recommend for someone to start with regarding this particular
book? (I haven't gone through the book yet.) Is there a technical reason why
material was changed so drastically, or is it more along the lines of
streamlining things for a university course? Are the things left out in the
subsequent editions interesting but not useful or are they interesting and
useful but not conducive to fitting into a one or two semester course
sequence?

~~~
abecedarius
Really I don't feel up-to-date enough to give great guidance. I worked through
most of the problems in the first edition back when it came out, and it
significantly influenced my approach to programming. With the later editions I
gave them a pretty superficial read. There are other newer textbooks like
Shriram Krishnamurthi's which I haven't read at all.

I don't think the first is 'better', but as examples of how it was more fun
there's the compiler chapter and an OOP chapter with a small OO language
organized around metaclasses instead of what I remember as a more tedious
development of Java-style OO in a later edition. I'd still expect the latest
edition has the most to learn from if you're picking just one.

~~~
bmitc
Thanks! It sounds like a good approach would be to work diligently through the
3rd and then circle back on the 1st and 2nd to pick up the little spots that
didn't make it. The metaclasses thing seems pretty interesting.

This book has been waiting on me to go through it. It's on the list with
finishing SICP and also PLAI.

------
kgoutham93
Apart from Coursera's course "programming languages", are there any other
courses which teach interesting concepts from different programming languages
instead of zeroing on 1 language.

------
zelphirkalt
The MIT Press page is a 404 unfortunately.

~~~
CalChris
The book is 2008.

~~~
zelphirkalt
Does this mean I cannot expect MIT Press to keep pages for a touch older book
alive or the page of the book to link to the correct MIT Press page?

------
waynesonfire
table of contents would be nice.

~~~
fernly
Not quite the same but the preface lists the chapter topics.

[http://eopl3.com/preface.html](http://eopl3.com/preface.html)

