Things I Was Wrong About: Types
I have changed my mind about some topics big and small so far in my life. Today: the value of types for programming.
Learning in public: on theology, technology, ethics, software, politics, art, and more.
Visit v5.chriskrycho.com → RSS feedOn Hacker News Sep 2020 – Jan 2025
Software Engineering 7Programming Languages 4Tools & Productivity 2Life, Learning & Writing 2Web & Frontend 1
I have changed my mind about some topics big and small so far in my life. Today: the value of types for programming.
One of the biggest things Zig has going for it—especially compared to Rust—is that it is (relatively) small. That sits in tension with Rust’s approach to solving memory safety problems, and sets up a nice challenge for future programming language designers.
A deep dive into Rust’s vec::Drain and its Drop implementation as an example of how ownership prevents subtle bugs—memory and otherwise!
I semi-regularly hear developers who claim that using Rust would not gain them anything because they would have to use `unsafe`. But this is not true. Local reasoning matters.