tisonkun commented on issue #27:
URL: 
https://github.com/apache/datasketches-rust/issues/27#issuecomment-3665786077

   `assert!` is used for checking invariants. When an assertion fails, it means 
an internal bug, and the program should crash instead of continuing in 
undefined behavior.
   
   It's impossible to change it to `Result<T, E>`. Because it should never 
fail, if you know the bug, you will fix it rather than return `Err(Bug)`.
   
   I do understand some situations where avoiding untrusted input can crash 
your program, like in deserialization. One should always use `Err(SerdeError)` 
rather than panic, because they are known failure cases.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to