munificent / craftinginterpreters

Repository for the book "Crafting Interpreters"
http://www.craftinginterpreters.com/
Other
8.84k stars 1.04k forks source link

The Lox Language (chapter) #73

Closed colms closed 7 years ago

colms commented 7 years ago

possible errors (if being really picky)

comments

munificent commented 7 years ago

copyright year is 2015, I forgot to point this out earlier

Fixed. This trips everyone up, even though only showing the oldest date is in fact sufficient. I think people expect copyrights to show freshness, when the intent is actually to show originality. The older the copyright the better, because it shows you got there first.

But, since it confuses everyone, changed it to show the date range.

"Ritchie had this idea called ..."

Added Dennis.

the term "Ref counting" isn't formally introduced.

Yeah. I looked at that pair of paragraphs and tried to figure out a what to weave in "I'm not gonna explain them", but couldn't get it to flow. 🤷‍♂️

The term "literal" is used.

An ongoing dilemma I have is not being sure how much knowledge the reader has. I am assuming they are already an experience programmer, so I expect some language lingo to be familiar to them as users of programming languages. In most cases, I do try to define it, at least roughly, but I don't want to spend too much prose assuming they know nothing.

"Functions are first-class in Lox" - I don't think "first-class" is defined.

It says: "which just means they are real values that you can get a reference to, store in variables, pass around"

I think that's enough of a definition. Hopefully, readers are already familiar with the term.

sometimes "first-class", sometimes "first class".

Ah, yes. The rule I'm following is that terms like this are hyphenated when used as an adjective ("first-class function") and not when used as a noun phrase ("functions are first class"). But I wasn't consistent. Went through and fixed a couple.

Thanks!