Skip to content
0:00 / 0:00

#designatedinitializers#structliterals#c++20

Named Field Init in C, C++20, Zig, Rust, & D

Context Free

24K subscribers • 25 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.

Intermediate. Assumes working knowledge.

23K views6 years ago1 recommendation

Programming languagesLanguage design and type systemsC++Rust

An exploration of designated initializers and named field initialization across C, C++20, Zig, Rust, and D, focusing on field order and construction.

C++20 formally supports designated initializers somewhat in the style of C99. Here, I discuss field order and issues around construction and destruction in C and C++ as well as Zig, Rust, and D. I also give a quick rundown of C++20 features in the recent GCC 10 release.

Why it's here

1 person recommends this

u/progreththin r/Zig • Recommends

Named Field Init in C, C++20, Zig, Rust, & D + Rust's deallocation pattern