Functions in Rust: Parameters, Returns, and Expressions
A practical guide to Rust functions — fn syntax, parameter types, return values, the difference between statements and expressions, the trailing-expression rule, and early returns.
53 posts · page 2 of 2
A practical guide to Rust functions — fn syntax, parameter types, return values, the difference between statements and expressions, the trailing-expression rule, and early returns.
A complete walkthrough of installing Rust with rustup on macOS, Linux, and Windows, then creating your first Cargo project and running it from the terminal.
A friendly tour of Rust's ownership system — the three rules, move semantics, Copy vs Clone, borrowing with & and &mut, the borrow checker, and the beginner errors you'll see first.
A practical tour of Rust variables and scalar types — let, mut, shadowing, integers, floats, booleans, chars, tuples, arrays, type inference, and constants. With runnable examples.
A practical introduction to Rust — where it came from, the three design goals that shape every decision, what it's the right tool for, and what it isn't. With your first Rust program.