Skip to content

Commit

Permalink
feat: update course2/lecture_en.md
Browse files Browse the repository at this point in the history
  • Loading branch information
skylee03 committed Mar 30, 2024
1 parent 1533f52 commit 844f60a
Show file tree
Hide file tree
Showing 2 changed files with 385 additions and 7 deletions.
13 changes: 6 additions & 7 deletions course2/course_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,17 @@ test {

---

# Expression-Based Programming
# Expression-Oriented Programming

- To write correct programs, we need to understand how programs are computed. Thus, we need to establish a **computational model** to comprehend the process.
- MoonBit programs can be described using a **value-oriented programming** approach.
- Value-oriented programming: _What is what?_
- MoonBit programs employ an **expression-oriented** approach.
- Expression-oriented programming: _What is what?_
- MoonBit programs consist of **expressions** that represent a value.
- Imperative programming: _What to do?_
- Programs are composed of **statements** that may modify the states.
- `Create a variable named x`
- `Assign 5 to x`
- `Let y point to x`
- ...
- Create a variable named `x`
- Assign `5` to `x`
- Let `y` point to `x`

---

Expand Down
Loading

0 comments on commit 844f60a

Please sign in to comment.