diff --git a/book/src/pages/foreword-1.md b/book/src/pages/foreword-1.md index ad09c1f1..4dd83b28 100644 --- a/book/src/pages/foreword-1.md +++ b/book/src/pages/foreword-1.md @@ -19,8 +19,11 @@ Since we're assuming you have little programming experience we won't go into the Suffice to say there are different ways to think about and write computer programs, and we've chosen the functional programming approach. The reasons for choosing functional programming are more interesting. -It's common to teach programming by what we call the "bag of syntax" approach. -In this approach a programming language is taught a collection of syntactical features (variables, for loops, while loops, methods) and students are left to figure out on their own when to use each feature. +It's common to teach programming by what we call the "bag of syntax" approach, where "syntax" is the term we use for the rules defining the structure of symbols in a programming language. +In English, we are taught that a sentence can be constructed using the rule: subject + verb + object e.g. "the artist paints a cat". +A programming language might have a different set of rules and symbols to read `Artist.paint(cat);`. +This is a general example - languages have syntax variations, and it is worth noting that the English sentence is purely descriptive while the general code example is instructing the computer to paint a cat using 'Artist', which could be a library or object. +In the "bag of syntax" approach a programming language is taught a collection of syntactical features (variables, for loops, while loops, methods) and students are left to figure out on their own when to use each feature. We've seen this method fail both when we were undergraduates learning programming, and as postgraduates teaching programming, as students simply have no systematic way to break down a problem and turn it into code. The result is that many students dropped out due to the poor quality of teaching. The students that remained tended to, like us, already have extensive programming experience.