In this episode of Dead Code, Jared talks with Kevlin Henney about the importance of immutability in software development, particularly as a strategy for reducing bugs related to state and concurrency. Kevlin explains that while many programming languages default to mutable state, treating state change as a privilege—not a right—can lead to more maintainable, less error-prone code. He discusses how immutability strengthens encapsulation, simplifies reasoning about systems, and avoids issues like race conditions and deadlocks, especially in multi-threaded environments. Kevlin also emphasizes that these design choices are architectural, not just implementation details, and that teams benefit from shared philosophies around state management. The conversation ties into broader programming culture and offers practical insights for developers, especially those working in languages like Ruby, where mutability is common but evolving.Links:Kevlin Henney’s article – “Restrict Mutability of State”Book – 97 Things Every Programmer Should KnowOpen source repo with contributionsOverflow collection curated by Shirish Padalkar (includes the “Restrict Mutability of State” essay)RubyConf Mini Providence Talk – Immutable Data StructuresRailsConf Talk – Immutable Objects in Practice@Kevlin on Bluesky@
[email protected] Henney on LinkedInDead Code Podcast Links:MastodonXJared’s Links:MastodonXtwitch.tv/jardonamronJared’s Newsletter & WebsiteEpisode Transcript Hosted on Acast. See acast.com/privacy for more information.