3 ms·
> First-class functions especially are is the killer feature you can't live without anymore once you tasted it. Wouldn't it depend on application domain what's
by RetroTechie 2y ago
> First-class functions especially are is the killer feature you can't live without anymore once you tasted it.
Wouldn't it depend on application domain what's a killer feature & what's not?
"Include if lightweight & very useful" seems appropiate. But what's considered "lightweight" varies depending on who you're asking / where you're looking, doesn't it?
- DanielHB 2y agoI disagree, first-class functions and closures are just so very useful to the point that even languages that have added it after initial release still feel gimped today because a lot of the older libraries (and probably most of the stdlib) don't use them extensively. Like passing a function to any function that iterates over a data structure (like array sorting), or registering an event handler. Sure you can usually achieve the same thing without first-class functions but it feels so much less concise. I just love first-class functions so much that the main reason I dislike python is that it doesn't include proper anonymous functions.