Smalltalk has a concept of blocks, which is a lightweight syntax for anonymous functions.
However, they have this marvellous property: you can return from the enclosing method! This makes them far more useful for things like iterating with early termination.
miniblog.
Related Posts
Suppose you want to make a small, hackable interpreter, so you write an AST walker.
Could you recover performance by supporting lightweight threads that use all the CPUs?
The Python GIL preferred single threaded performance over multithreading, this is the opposite.
TIL that coreutils has a lightweight version of the `finger` command, appropriately named `pinky`!
One remarkable aspect of the JS packaging ecosystem is that people package individual functions. For example, lodash.sortby: https://www.npmjs.com/package/lodash.sortby
It shows how lightweight the packaging process is. I've not seen this happen in other ecosystems.