James Baxter@discuss.online to Fediverse@lemmy.worldEnglish · 8 months agoWhy I started Sublinks: A timeline of eventsjasongr.imexternal-linkmessage-square35fedilinkarrow-up186arrow-down10
arrow-up186arrow-down1external-linkWhy I started Sublinks: A timeline of eventsjasongr.imJames Baxter@discuss.online to Fediverse@lemmy.worldEnglish · 8 months agomessage-square35fedilink
minus-squareSorteKanin@feddit.dklinkfedilinkEnglisharrow-up5arrow-down1·8 months agoI’m all for competition within the Fediverse (that’s a big strength of the Fediverse if you ask me). I just wish we’d move on from Java and other exception-based languages.
minus-squareasdfasdfasdf@lemmy.worldlinkfedilinkEnglisharrow-up2·edit-28 months agoExceptions opt out of the type system. The problem with them is the same problem as null. Here’s a video of the creator of null explaining: https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/ Null and errors are just values at the end of the day, and should be treated as such. Doing so means your code is far easier to reason about. Rust takes this approach and is one of the many reasons people love it so much.
I’m all for competition within the Fediverse (that’s a big strength of the Fediverse if you ask me). I just wish we’d move on from Java and other exception-based languages.
What’s wrong with exceptions?
Exceptions opt out of the type system. The problem with them is the same problem as null. Here’s a video of the creator of null explaining: https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/
Null and errors are just values at the end of the day, and should be treated as such. Doing so means your code is far easier to reason about.
Rust takes this approach and is one of the many reasons people love it so much.