What is Nostr?
james / James Lewis
npub1nf9…xa3x
2023-12-29 15:17:52
in reply to nevent1q…5pgl

james on Nostr: Oh! Of course! Rust itself doesn't have `null`, but I can totally make more falsy ...

Oh! Of course! Rust itself doesn't have `null`, but I can totally make more falsy Options, and that would enable me to have a lot more control about exceptions, like "missing," (API doesn't know it should be there) "empty," (API failed to give a value) or actually `false` (API knew it should be there and set it to `false`) being different, usable cases.

That should be better code than my go-to of negative INTs to communicate a specific error type.
Author Public Key
npub1nf9vm6uhs4j7yaysmjn9eqlf7et5t6hvrkdqgpd995vcc9yfjyas0pxa3x