Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Syntax Definition to Fix Issue #73 #88

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions book/src/pages/foreword-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
kulsoom2003 marked this conversation as resolved.
Show resolved Hide resolved
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.
kulsoom2003 marked this conversation as resolved.
Show resolved Hide resolved
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.
Expand Down
Loading