#rustlang can yinz give me a concrete example of a case in your code (not stdlib) when you would want to call `panic!`?
i can easily see going overboard with checking contracts though... where do you draw the line?
-
-
I would say that inside the library impl, assert or debug is good. At the interface, more nuanced errors.
-
straw example: Vec is full of panics, but HashMap offers Options and the Entry interface. Why?
- 1 more reply
New conversation -
-
-
only when it's absolutely critical to the application. Otherwise the performance cost is too much
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.