logoalt Hacker News

m00dy • today at 3:07 AM • 3 replies • view on HN

>>I am really worried about the negative return value being added. Existing third party callers might not be ready to handle this correctly (i.e. if they cast the return to size_t without checking). Could we instead return 0? (In all the added error returns in this PR.)

Rust fixes it.


Replies

layer8 • today at 9:58 AM

Rust does not fix existing third party callers.

➕ show 1 reply
bjoli • today at 7:50 AM

Sometimes I like to think of how little performance would be lost and how much would be gained by just collectively deciding to use Option/Result instead of sentinel values.

Things like the dumb (not like I'm any individual being dumb. Just collective accumulated stupidity) a*hole vulnerability some weeks ago. That wasn't even performance sensitive.

sippingabonedry • today at 3:58 AM

Be sure to let us know when your equivalent Rust crypto library is available.

➕ show 2 replies