Wikipedia's article on first-class citizens states that "some authors" believe functions are only first-class citizens in a language if the language supports their creation at run-time. This article written by James Coglan plainly calls functions first-class citizens - whether or not he is aware of the dispute over the criteria for first-class, I do not know.
Here are my questions:
- Using the additional criteria of "creation at run-time", are JavaScript procedures first-class citizens?
- If so, what does the creation of a function at run-time look like in JavaScript (is this what we call promises, callbacks, etc.)?
- If not, what does the creation of a function look like at run-time in another language?
Aucun commentaire:
Enregistrer un commentaire