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.
Objet (informatique)En informatique, un objet est un conteneur symbolique et autonome qui contient des informations et des mécanismes concernant un sujet, manipulés dans un programme. Le sujet est souvent quelque chose de tangible appartenant au monde réel. C'est le concept central de la programmation orientée objet (POO). En programmation orientée objet, un objet est créé à partir d'un modèle appelé classe ou prototype, dont il hérite les comportements et les caractéristiques.
Object lifetimeIn object-oriented programming (OOP), the object lifetime (or life cycle) of an object is the time between an object's creation and its destruction. Rules for object lifetime vary significantly between languages, in some cases between implementations of a given language, and lifetime of a particular object may vary from one run of the program to another. In some cases, object lifetime coincides with variable lifetime of a variable with that object as value (both for static variables and automatic variables), but in general, object lifetime is not tied to the lifetime of any one variable.
Type énuméréEn programmation informatique, un type énuméré (appelé souvent énumération ou juste enum, parfois type énumératif ou liste énumérative) est un type de données qui consiste en un ensemble de valeurs constantes. Ces différentes valeurs représentent différents cas ; on les nomme énumérateurs. Lorsqu'une variable est de type énuméré, elle peut avoir comme valeur n'importe quel cas de ce type énuméré. Un exemple typique est la représentation de cartes à jouer ordinaires : la suite ("couleur") ainsi que la hauteur (nombre ou figure) de la carte peuvent être représentés par des énumérations.
Complément d'objetvignette|Pour le complément d’objet direct on pose la question qui? Quoi? Mais en ceux qui concerne le complément d’objet indirect on pose la question À qui? À quoi? En grammaire, un complément d’objet est un syntagme qui vient donner une information sur le verbe. Il fait partie du prédicat et est qualifié d’essentiel. On distingue deux formes de compléments d’objet : le complément d'objet direct (COD), un groupe nominal ou son substitut ; le complément d'objet indirect (COI), un groupe prépositionnel ou son substitut, le complément d'objet second, un COI placé après un COD du même verbe.
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.
Tagged unionIn computer science, a tagged union, also called a variant, variant record, choice type, discriminated union, disjoint union, sum type or coproduct, is a data structure used to hold a value that could take on several different, but fixed, types. Only one of the types can be in use at any one time, and a tag field explicitly indicates which one is in use. It can be thought of as a type that has several "cases", each of which should be handled correctly when that type is manipulated.
Base de données orientée objetEn informatique, une base de données à objets (anglais object database) est un stock d'informations groupées sous forme de collections d'objets persistants. Une base de données est un ensemble d'informations connexes stockées dans un dispositif informatique. Dans une base de données à objets les informations sont regroupées sous forme d'objets : un conteneur logique qui englobe des informations et des traitements relatifs à une chose du monde réel.
Uniqueness typeIn computing, a unique type guarantees that an object is used in a single-threaded way, with at most a single reference to it. If a value has a unique type, a function applied to it can be optimized to update the value in-place in the object code. Such in-place updates improve the efficiency of functional languages while maintaining referential transparency. Unique types can also be used to integrate functional and imperative programming. Uniqueness typing is best explained using an example.
Primitive data typeIn computer science, primitive data types are a set of basic data types from which all other data types are constructed. Specifically it often refers to the limited set of data representations in use by a particular processor, which all compiled programs must use. Most processors support a similar set of primitive data types, although the specific representations vary. More generally, "primitive data types" may refer to the standard data types built into a programming language (built-in types).