]> git.proxmox.com Git - rustc.git/blame - src/doc/book/src/ch03-00-common-programming-concepts.md
New upstream version 1.66.0+dfsg1
[rustc.git] / src / doc / book / src / ch03-00-common-programming-concepts.md
CommitLineData
13cf67c4
XL
1# Common Programming Concepts
2
3This chapter covers concepts that appear in almost every programming language
4and how they work in Rust. Many programming languages have much in common at
5their core. None of the concepts presented in this chapter are unique to Rust,
6but we’ll discuss them in the context of Rust and explain the conventions
7around using these concepts.
8
9Specifically, you’ll learn about variables, basic types, functions, comments,
10and control flow. These foundations will be in every Rust program, and learning
11them early will give you a strong core to start from.
12
9fa01778
XL
13> #### Keywords
14>
2b03887a
FG
15> The Rust language has a set of *keywords* that are reserved for use by the
16> language only, much as in other languages. Keep in mind that you cannot use
17> these words as names of variables or functions. Most of the keywords have
9fa01778
XL
18> special meanings, and you’ll be using them to do various tasks in your Rust
19> programs; a few have no current functionality associated with them but have
20> been reserved for functionality that might be added to Rust in the future. You
94222f64 21> can find a list of the keywords in [Appendix A][appendix_a]<!-- ignore -->.
74b04a01
XL
22
23[appendix_a]: appendix-01-keywords.md