Commune · Savoirs
Function object
Programming construct allowing an object to be invoked or called as if it were an ordinary function, usually with the same syntax
In computer programming, a function object is a construct allowing an object to be invoked or called as if it were an ordinary function, usually with the same syntax (a function parameter that can also be a function). In some languages, particularly C++, function objects are often called functors (not related to the functional programming concept).
Sur Wikipédia
Traduit automatiquement depuis l'article en anglais
En programmation informatique, un objet fonction est une construction permettant à un objet d'être invoqué ou appelé comme s'il s'agissait d'une fonction ordinaire, généralement avec la même syntaxe (un paramètre de fonction pouvant également être une fonction). Dans certains langages, en particulier en C++, les objets fonctions sont souvent appelés foncteurs (sans rapport avec le concept de programmation fonctionnelle). Un usage typique d'un objet fonction est l'écriture de fonctions de rappel (callbacks).
Texte : Wikipédia en anglais, traduction automatique, CC BY-SA 4.0. ·