- Rust Essentials(Second Edition)
- Ivo Balbaert
- 102字
- 2021-07-02 15:30:37
Using Variables and Types
In this chapter, we look at the basic building blocks of a Rust program, like variables and types. We discuss variables of primitive types, whether their type has to be declared or not, and the scope of variables. Immutability, one of the cornerstones of Rust's safety strategy, is also discussed and illustrated.
We will cover the following topics:
- Comments
- Global constants
- Values and primitive types
- Binding variables to values
- Scope of a variable and shadowing
- Type checking and conversions
- Expressions
- The stack and the heap
Our code examples will center on building a text-based game called Monster Attack.
推薦閱讀
- Java范例大全
- Learning C# by Developing Games with Unity 2020
- 新編Premiere Pro CC從入門到精通
- 重學Java設計模式
- 精通Python設計模式(第2版)
- 微信小程序項目開發實戰
- Learning Three.js:The JavaScript 3D Library for WebGL
- Windows內核編程
- Python 3 數據分析與機器學習實戰
- 微課學人工智能Python編程
- JQuery風暴:完美用戶體驗
- Practical Maya Programming with Python
- SSH框架企業級應用實戰
- AngularJS UI Development
- 體驗之道:從需求到實踐的用戶體驗實戰