Перейти к содержимому

Zig Pointers Explained — *T, [*]T, and Why They're Never Null (Learn Zig #7)

ThinkingOutLoud

0:00 / 0:00

Zig Pointers Explained — *T, [*]T, and Why They're Never Null (Learn Zig #7)

125 просмотров · 2 недели назад
ThinkingOutLoud
49 подписчиков
125 просмотров · 2 недели назад
Pointers in Zig — how to get them, dereference them, and why they are never null by default. This video covers single-item *T, many-item [*]T, const vs mutable, pass by reference, and how Zig keeps you safe where C does not. This is Video 7 of our beginner-friendly Zig series. What you will learn: → What a pointer is — a value holding a memory address → Single-item pointers T — & to get, . to dereference → Pass by reference — modifying the original through a pointer → *const T vs *T — read-only vs read-write pointers → ?*T — nullable pointers using optionals → Many-item pointers [*]T — no bounds checks, prefer slices → Zig vs C pointer safety — why Zig eliminates undefined behavior #zig #ziglang #programming #learnzig #pointers