Return statementIn computer programming, a return statement causes execution to leave the current subroutine and resume at the point in the code immediately after the instruction which called the subroutine, known as its return address. The return address is saved by the calling routine, today usually on the process's call stack or in a register. Return statements in many programming languages allow a function to specify a return value to be passed back to the code that called the function.
Sous-programmeEn informatique, un sous-programme est un sous-ensemble du programme dans sa hiérarchie fonctionnelle. Un sous-programme doit pouvoir mémoriser l'adresse du code appelant pour permettre, à l'aide d'une instruction spécifique, de charger le pointeur de programme avec cette adresse de retour. Cela correspond bien souvent à une routine. Cependant, la notion de sous-programme est un peu plus générale, car il ne possède pas nécessairement son propre espace de noms. C'est le cas par exemple des sous-programmes appelés par l'instruction en BASIC.
Covariance and contravariance (computer science)Many programming language type systems support subtyping. For instance, if the type is a subtype of , then an expression of type should be substitutable wherever an expression of type is used. Variance is how subtyping between more complex types relates to subtyping between their components. For example, how should a list of s relate to a list of s? Or how should a function that returns relate to a function that returns ? Depending on the variance of the type constructor, the subtyping relation of the simple types may be either preserved, reversed, or ignored for the respective complex types.
Foreign function interfaceA foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written or compiled in another one. An FFI is often used in contexts where calls are made into binary dynamic-link library. The term comes from the specification for Common Lisp, which explicitly refers to the programming language feature enabling for inter-language calls as such; the term is also often used officially by the Haskell, Rust, Python, and LuaJIT (Lua) interpreter and compiler documentations.
Scala (langage)Scala est un langage de programmation multi-paradigme conçu à l'École polytechnique fédérale de Lausanne (EPFL) pour exprimer les modèles de programmation courants dans une forme concise et élégante. Son nom vient de l'anglais Scalable language qui signifie à peu près « langage adaptable » ou « langage qui peut être mis à l'échelle ». Il peut en effet être vu comme un métalangage. Scala intègre les paradigmes de programmation orientée objet et de programmation fonctionnelle, avec un typage statique.
Statement (computer science)In computer programming, a statement is a syntactic unit of an imperative programming language that expresses some action to be carried out. A program written in such a language is formed by a sequence of one or more statements. A statement may have internal components (e.g. expressions). Many programming languages (e.g. Ada, Algol 60, C, Java, Pascal) make a distinction between statements and definitions/declarations. A definition or declaration specifies the data on which a program is to operate, while a statement specifies the actions to be taken with that data.
ConstEn programmation dans les langages C ou C++, const est un mot-clé permettant au programmeur de signaler au compilateur que l'élément ainsi qualifié ne doit pas être modifié pendant l'exécution du programme. Cet élément sera donc constant tout le long d'une exécution normale du programme. En tant que mot-clé réservé par spécification du langage, il ne peut être utilisé que pour son objectif, ce qui proscrit, par exemple, son usage en tant que nom de variable. Sa première introduction se situe dans la norme ANSI du langage C de 1989.
Switch (instruction)En programmation informatique, switch (« aiguillage » en anglais), parfois aussi select (comme en VB) ou inspect ou case of (Pascal, Modula 2) ou Match (Rust et Python) est une instruction qui permet d'effectuer un branchement à partir de la valeur d'une variable. Elle peut dans certains cas remplacer une série (souvent peu élégante) de if... else. On l'utilise lorsque les cas à gérer sont nombreux. Ce mécanisme est préfiguré dans les années 1960 par les branchements calculés.
Parametric polymorphismIn programming languages and type theory, parametric polymorphism allows a single piece of code to be given a "generic" type, using variables in place of actual types, and then instantiated with particular types as needed. Parametrically polymorphic functions and data types are sometimes called generic functions and generic datatypes, respectively, and they form the basis of generic programming. Parametric polymorphism may be contrasted with ad hoc polymorphism.
Calling conventionIn computer science, a calling convention is an implementation-level (low-level) scheme for how subroutines or functions receive parameters from their caller and how they return a result. When some code calls a function, design choices have been taken for where and how parameters are passed to that function, and where and how results are returned from that function, with these transfers typically done via certain registers or within a stack frame on the call stack.
Polymorphisme (informatique)En informatique et en théorie des types, le polymorphisme, du grec ancien polús (plusieurs) et morphê (forme), est le concept consistant à fournir une interface unique à des entités pouvant avoir différents types. Par exemple, des opérations telles que la multiplication peuvent ainsi être étendues à des scalaires aux vecteurs ou aux matrices, l'addition, des scalaires aux fonctions ou aux chaînes de caractères, etc.
First-class functionIn computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens. This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions (function literals) as well.
Ad hoc polymorphismIn programming languages, ad hoc polymorphism is a kind of polymorphism in which polymorphic functions can be applied to arguments of different types, because a polymorphic function can denote a number of distinct and potentially heterogeneous implementations depending on the type of argument(s) to which it is applied. When applied to object-oriented or procedural concepts, it is also known as function overloading or operator overloading.
Principe de substitution de Liskovvignette|Barbara Liskov en 2010 Le principe de substitution de Liskov (LSP) est, en programmation orientée objet, une définition particulière de la notion de sous-type. Il a été formulé par Barbara Liskov et Jeannette Wing dans un article intitulé Family Values: A Behavioral Notion of Subtyping : Liskov et Wing en ont proposé la formulation condensée suivante : Si est une propriété démontrable pour tout objet de type , alors est vraie pour tout objet de type tel que est un sous-type de .
Type classIn computer science, a type class is a type system construct that supports ad hoc polymorphism. This is achieved by adding constraints to type variables in parametrically polymorphic types. Such a constraint typically involves a type class T and a type variable a, and means that a can only be instantiated to a type whose members support the overloaded operations associated with T.
X86 calling conventionsThis article describes the calling conventions used when programming x86 architecture microprocessors. Calling conventions describe the interface of called code: The order in which atomic (scalar) parameters, or individual parts of a complex parameter, are allocated How parameters are passed (pushed on the stack, placed in registers, or a mix of both) Which registers the called function must preserve for the caller (also known as: callee-saved registers or non-volatile registers) How the task of preparing the stack for, and restoring after, a function call is divided between the caller and the callee This is intimately related with the assignment of sizes and formats to programming-language types.
Fonction elliptique de JacobiEn mathématiques, les fonctions elliptiques de Jacobi sont des fonctions elliptiques d'une grande importance historique. Introduites par Carl Gustav Jakob Jacobi vers 1830, elles ont des applications directes, par exemple dans l'équation du pendule. Elles présentent aussi des analogies avec les fonctions trigonométriques, qui sont mises en valeur par le choix des notations sn et cn, qui rappellent sin et cos. Si les fonctions elliptiques thêta de Weierstrass semblent mieux adaptées aux considérations théoriques, les problèmes physiques pratiques font plus appel aux fonctions de Jacobi.
Python syntax and semanticsThe syntax of the Python programming language is the set of rules that defines how a Python program will be written and interpreted (by both the runtime system and by human readers). The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages. It supports multiple programming paradigms, including structured, object-oriented programming, and functional programming, and boasts a dynamic type system and automatic memory management.
Structure de contrôleEn programmation informatique, une structure de contrôle est une instruction particulière d'un langage de programmation impératif pouvant dévier le flot de contrôle du programme la contenant lorsqu'elle est exécutée. Si, au plus bas niveau, l'éventail se limite généralement aux branchements et aux appels de sous-programme, les langages structurés offrent des constructions plus élaborées comme les alternatives (if, if–else, switch...), les boucles (while, do–while, for...) ou encore les appels de fonction.
Algorithme récursifUn algorithme récursif est un algorithme qui résout un problème en calculant des solutions d'instances plus petites du même problème. L'approche récursive est un des concepts de base en informatique. Les premiers langages de programmation qui ont autorisé l'emploi de la récursivité sont LISP et Algol 60. Depuis, tous les langages de programmation généraux réalisent une implémentation de la récursivité. Pour répéter des opérations, typiquement, un algorithme récursif s'appelle lui-même.