- 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語言程序設計
- 潮流:UI設計必修課
- Learning Spring 5.0
- 跟小海龜學Python
- Spring Cloud、Nginx高并發核心編程
- Mastering Unity Shaders and Effects
- Effective Python Penetration Testing
- Apache Mahout Clustering Designs
- Scala程序員面試算法寶典
- Geospatial Development By Example with Python
- Java EE企業級應用開發教程(Spring+Spring MVC+MyBatis)
- FFmpeg開發實戰:從零基礎到短視頻上線
- Java EE 8 and Angular
- Java Hibernate Cookbook
- Python編程快速上手2