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

Since a single-method object easily serves the role of such a function, that’s simply not true. Looking at the 23 GoF patterns, I can’t identify any that would be obviated by having first-class functions (or lambdas, as many OO languages nowadays have). Some of the patterns can employ first-class functions (e.g. an observer could be just a callback function reference), but the pattern as such remains.
 help



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

Search: