TootSweet@lemmy.world to Programming@programming.devEnglish · 2 days agoThe Compiler Is Your Best Friend, Stop Lying to It - Daniel Beskin's Blogblog.daniel-beskin.comexternal-linkmessage-square13fedilinkarrow-up1117arrow-down12
arrow-up1115arrow-down1external-linkThe Compiler Is Your Best Friend, Stop Lying to It - Daniel Beskin's Blogblog.daniel-beskin.comTootSweet@lemmy.world to Programming@programming.devEnglish · 2 days agomessage-square13fedilink
minus-squareexpr@programming.devlinkfedilinkarrow-up5arrow-down1·18 hours agohttps://en.wikipedia.org/wiki/Algebraic_data_type Some reading material for you. Sum types allow for proper, compiler-enforced error handling and optionality rather than the unprincipled free for all that is exceptions and nullability. Tony Hoare, the person that originally introduced nulls to the programming world, is oft-quoted as calling nulls the “billion dollar mistake”. Here’s the talk: https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/.
https://en.wikipedia.org/wiki/Algebraic_data_type
Some reading material for you. Sum types allow for proper, compiler-enforced error handling and optionality rather than the unprincipled free for all that is exceptions and nullability.
Tony Hoare, the person that originally introduced nulls to the programming world, is oft-quoted as calling nulls the “billion dollar mistake”. Here’s the talk: https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/.