News for hackers. Stuff that matters.
Re:Don't Use Booleans by junon on Tuesday July 09, 2024 @06:35AM (#40914478)
Option is the better of the two. With a missing variant, there's no way to encode "infallibly successful". All call sites would have to check for a missing variant in all cases.
Re:Don't Use Booleans by danhau on Tuesday July 09, 2024 @10:39AM (#40916671)
This. Enum with a “missing“ variant is basically the billion dollar mistake again… kinda.