Module 8 – Why Does a Rust Program Look Like This?
Module 8 Complete
You have now explored the same idea using three programming languages.
- Pascal
- Ada
- Rust
Although each language looks different, they all communicate precise instructions to a computer.
Week 2 Comparison
| Concept | Pascal | Ada | Rust |
|---|---|---|---|
| Program Entry | program | procedure | fn main() |
| Start Block | begin | begin | { |
| End Block | end. | end Hello; | } |
| Print Text | WriteLn | Put_Line | println! |
| Text | 'Hello, World!' | "Hello, World!" | "Hello, World!" |
| Statement End | ; | ; | ; |
Agila Principle
Programming languages may use different keywords, punctuation, and symbols, but they all exist for one purpose: to communicate precise instructions to a computer.
Great engineers do not simply memorize syntax. They understand the concepts behind the syntax.
Ready for the Quiz?
You should now understand:
- Why Rust uses fn.
- Why every Rust program starts with main().
- Why Rust uses braces { } instead of begin/end.
- Why println! prints text.
- Why parentheses, quotation marks, and semicolons all have important jobs.
Complete this lesson
Answer every check correctly to earn your lesson certificate. Feedback helps you review and try again.
Sign in · Save your progress and earn a certificate for this lesson.