Use Arc Instead of Vec
Rust lets you do efficient reference-counted strings and dynamic arrays using Arc basically just as easily as their owning (and deep-cloning) equivalents, String and Vec respectively. So why not use them as a reasonable default, until you actually need the mutability that String and Vec provide? Get into the weeds with me here, feat. some cool visualizations, with special guest appearance from Box. This video assumes some familiarity with Rust and its core smart pointer types, namely Vec/String/Rc/Arc/Box, along with data structures like HashMap and BTreeMap, and traits like Clone, Hash, Ord, and serde::{Serialize, Deserialize}. serde feature flag for Rc/Arc: https://serde.rs/feature-flags.html#-... Arc docs: https://doc.rust-lang.org/std/sync/st... Vec docs: https://doc.rust-lang.org/std/vec/str... Smart pointers in Rust: • Crust of Rust: Smart Pointers and Interior... animations: https://www.manim.community/

Two Ways To Do Dynamic Dispatch

Arc instead of Vec? | Prime Reacts

14 Rust Smart Pointers Compared

Comprehending Proc Macros

I Created Malware with Rust (It's Terrifyingly Easy!!)

Verse: A New Scripting Language? In THIS Economy?

Moves Are Broken

but what is 'a lifetime?

Visualizing memory layout of Rust's data types

Choose the Right Option

Rust Functions Are Weird (But Be Glad)

Self-referential structs (in Rust)

I Wrote my Own Filesystem to Beat Factorio.

Constructors Are Broken

A Simpler Way to See Results
![Visualizing memory layout of Rust's data types [See description/first comment]](https://i.ytimg.com/vi/rDoqT-a6UFg/hqdefault.jpg?sqp=-oaymwEnCNACELwBSFryq4qpAxkIARUAAAAAGAElAADIQj0AgKJDeAG4AvMY&rs=AOn4CLBRQft5rfEWk3XJ6bcYNsE1foB17w&usqp=CCY)
Visualizing memory layout of Rust's data types [See description/first comment]

"Type-Driven API Design in Rust" by Will Crichton

Rust: Generics, Traits, Lifetimes

Insane Shadow Data Trick in C

