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

> they can always be emulated by a global function with a data object to bundle captured state

Only if you already have the infrastructure in place to pass that captured state through to where it's needed. For a C example, you can't (safely) use an "emulated closure" with qsort (e.g. if you want to write a function that takes a list and an integer, and sorts the list modulo that integer), because you have no way to pass the data object through.



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

Search: