Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
masklinn
on Jan 25, 2019
|
parent
|
context
|
favorite
| on:
Special Cases Are a Code Smell
> i is a usize and if i == 0 then i-1 will panic due to underflow.
Not in release mode.
lilyball
on Jan 25, 2019
[–]
While it's true that it doesn't panic in release mode, that's supposed to be an optimization and the correct semantics are what's implemented in debug mode. Besides, you don't want to write a program that only functions in release mode.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Not in release mode.