Rust Syntax


#programming #compiling #rust #dev #tech #code #systems #lang #learn #language #syntax

Primitives = the categories/types themselves (like i32, bool, char).

Literals = the actual written values you put in your code (like 5, "hello", true).

aka

Primitive = “money” (the concept of a type of thing)

Literal = “$10 bill in my hand” (a specific value of that type)


Type = Dog (what it is)

Trait = Speak (what it can do)

Method = lick and run (actions a Dog knows how to do)

Function = double (general action not tied to Dog)

Expression = x * 2, Dog::new(...), self.age += 1 (the little building blocks inside everything)

Back to the top ↑