Remix.run Logo
orthoxerox 8 hours ago

Crafting Interpreters is great, I wish it had a companion book that covered:

  - types and typing
  - optimization passes
  - object files, executables, libraries and linking
Then two of them would be sufficient for writing a compiler.
gavinray 7 hours ago | parent | next [-]

To your last point, "Linkers and Loaders" has no equal despite being a bit dated

ux266478 7 hours ago | parent | prev | next [-]

> types and typing

This would be like asking for a book on designing grammar. It's just too disjoint of a field to have any kind of reasonable baseline, and it's drop dead easy to grok a basic one together. With those two things being equal, just like with grammar, the answer to this is any resource about implementing the language you're trying to ape.

orthoxerox 7 hours ago | parent [-]

It's drop dead easy to grok a basic one together until you get to hairy stuff like overloading, lambdas and generics.

The reasonable baseline would be something like Java 1. Scalars, arrays and classes. If I remember correctly, Lox even skips arrays as an exercise for the user.

duped 7 hours ago | parent | prev | next [-]

> types and typing

Types and Programming Languages, Benjamin C Pierce

> object files, executables, libraries and linking

Linkers and Loaders, John R Levine

orthoxerox 7 hours ago | parent [-]

I've read Pierce. It's not a bad book, but less grounded than CI, which has an explicit "workmanlike" approach.

4 hours ago | parent | prev [-]
[deleted]