I understand the broad concept of closure (functions are stored together with a snapshot of the environment at the time of their definition) and functions as first-class citizens, which means that functions can be transferred and returned, like any other type of data in the language.
Interestingly, all the languages I worked with them have functions as first-class citizens, for example Python, Javascript, Scheme, it seems, always have closures.
Indeed, transferring and returning closures to and from a function is one of the ways to implement functions as citizens of the first class of this language, but I am not sure that the ability to write them is a direct and inevitable consequence of the fact that functions are first-class citizens.
To add more specific terms:
Can you provide an actual example of a language that has first-class features, but where closures can not be written?
source
share