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

A practical example of this is libpng:

http://www.libpng.org/pub/png/libpng-1.2.5-manual.html



I wouldn't go so far as to call that "practical." It's a cute trick, but it becomes really annoying when trying to write libpng bindings for any environment other than plain C.


PostgreSQL also uses longjmp to implement TRY/CATCH macros:

https://github.com/postgres/postgres/blob/master/src/include...


as someone who has used libpng I'd describe it as an example of why this is a terrible idea.




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

Search: