Learn Rust

2024/07/17 Learning 共 420 字,约 2 分钟
call me JC

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 time

dynamic types:
the type is known at run time

文档信息

Search

    Table of Contents