Hacker News new | past | comments | ask | show | jobs | submit login

Unfortunately, in many situations you also need to ask noun-like questions about your closures.

For things like loop bodies, conditionals passed to filters, comparisons passed to sorts, etc., closures work very well. But when you start using a closure to e.g. represent an I/O endpoint (e.g. () => string for reading, string => () for writing to / from a console), you'll also want to do things like flush buffers.




That's why closures are a poor man's objects. :-)


When, not why :-)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: