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

For tasks that are created, executed, and processed purely in code, you wouldn't. But it still has uses in other areas, especially when you need to build something up from user input.


Could you give a concrete example? Why wouldn't you be able to use first-class functions when building something up from user input? How about giving us a code snippet? The consensus in the CS community is that the command pattern disappears (becomes overkill) for languages with first-class functions. This has been noted as early as 1998 by Norvig when comparing C++ to Lisp. It's one of my criticisms of Addy's JS Patterns book. He just blindly copies the GoF patterns and many of them are not needed in languages with modern features.




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

Search: