Introduction
The big difference between C/C++ and Rust:
safe by default:
all memory accesses are checked.
The unifying principles behind Rust:
- strictly enforcing safe borrowing of data
- functions, methods and closures to operate on data
- tuples, structs and enums to aggerate data
- pattern matching to select and destructre data
- traits to define behaviour on data
Rust is statically-typed and strongly-typed
static types:
the type is known at compile timedynamic types:
the type is known at run time
文档信息
- 本文作者:Yang Jucai
- 本文链接:https://yangjucai.github.io//2024/07/17/Learn-Rust/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)