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

> Function inverses are the kind of construct that changes how we view code.

> [..] For example, consider pairs of malloc/free, acquire/release, and open/close.

> All of them follow the pattern captured in the Under idiom: We do something to

> create a context, apply some functions in that context, and then leave our context

> by undoing the initial effects with a logical inverse like free, close, etc.

How do function inverses interact with error handling? What happens when a file cannot be opened because it doesn't exist? Or when the file can be opened but subsequent reads fail because the file is empty?

How do you typically work with errors in programming languages like APL / J / K? (I don't mean how do you work with errors in the REPL but how do you catch and handle/report errors in your program and recover/continue gracefully?)



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

Search: