Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If let is probably the closest to a regular bool.

For ints you can implement the deref trait on structs. So you can treat YourType(u64) as a u64 without destructing. I couldn’t figure out a way to do that with YouType(bool).





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: