getify / You-Dont-Know-JS

A book series on JavaScript. @YDKJS on twitter.
Other
177.97k stars 33.41k forks source link

Chapter 2: Functions, Confusing Grammar #1697

Open brandedcow opened 3 years ago

brandedcow commented 3 years ago

Last sentence in the 7th paragraph is phrased in a confusing way:

Not all languages treat functions as values, but it's essential for a language to support the functional programming pattern, as JS does.

Some suggested alternatives:


Edition: 2nd

Book Title: YDKJSY

Chapter: 2

Section Title: Functions

Problem: Grammar

getify commented 3 years ago

If it read "Not all languages treat functions as values, but that's essential..." would it read clearer to you?

brandedcow commented 3 years ago

Yea, that would work, something like:

Not all languages treat functions as values, but that's essential to support the functional programming pattern, as JS does.

getify commented 3 years ago

OK, it's a minor nit, which I don't typically indulge (especially after a book has been published for almost 9 months). But I can see where there's a little confusion, so I will keep this issue open for if/when I do a future errata update.