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

Sounds like you should instead be making these invalid states unrepresentable by encoding them in types and/or adding assertions. Especially if you're exposing them as interfaces, as your example function names would imply.


They're invalid states inside the USB device, not inside the driver code. So nothing you do to the driver code can make them unrepresentable. The best you can do is avoid frobbing the device in the problematic ways.


The GP is making those invalid states unreachable by writing a device driver.




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

Search: