4 ms·
I 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 gimp
by DanielHB 2y ago
I 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.