dbo:abstract
|
- In programming languages and type theory, a product of types is another, compounded, type in a structure. The "operands" of the product are types, and the structure of a product type is determined by the fixed order of the operands in the product. An instance of a product type retains the fixed order, but otherwise may contain all possible instances of its primitive data types. The expression of an instance of a product type will be a tuple, and is called a "tuple type" of expression. A product of types is a direct product of two or more types. If there are only two component types, it can be called a "pair type". For example, if two component types A and B are the set of all possible values of that type, the product type written A × B contains elements that are pairs (a,b), where "a" and "b" are instances of A and B respectively. The pair type is a special case of the dependent pair type, where the type B may depend on the instance picked from A. In many languages, product types take the form of a record type, for which the components of a tuple can be accessed by label. In languages that have algebraic data types, as in most functional programming languages, algebraic data types with one constructor are isomorphic to a product type. In the Curry–Howard correspondence, product types are associated with logical conjunction (AND) in logic. The notion directly extends to the product of an arbitrary finite number of types (a n-ary product type), and in this case, it characterizes the expressions which behave as tuples of expressions of the corresponding types. A degenerated form of product type is the unit type: it is the product of no types. In call-by-value programming languages, a product type can be interpreted as a set of pairs whose first component is a value in the first type and whose second component is a value in the second type. In short, it is a cartesian product and it corresponds to a product in the category of types. Most functional programming languages have a primitive notion of product type. For instance, the product of type1, ..., typen is written type1*...*typen in ML and (type1,...,typen) in Haskell. In both these languages, tuples are written (v1,...,vn) and the components of a tuple are extracted by pattern-matching. Additionally, many functional programming languages provide more general algebraic data types, which extend both product and sum types. Product types are the dual of sum types. (en)
- Тип-произведение (также Π-тип, произведение типов; англ. product type) — конструкция в языках программирования и интуиционистской теории типов, тип данных, построенный как декартово произведение исходных типов; другими словами — кортеж типов, или «кортеж как тип». Использованные типы и порядок их следования определяют типа-произведения; порядок следования объектов в создаваемом кортеже сохраняется на протяжении его времени жизни согласно заданной сигнатуре. Например, если типы <i>A</i> и <i>B</i> представляют собой множества значений <i>a</i> и <i>b</i> соответственно, то составленное из них декартово произведение записывается как <i>A</i>×<i>B</i>, и полученный тип-произведение представляет собой всё множество возможных пар (<i>a</i>,<i>b</i>). (ru)
- Тип-добуток (також Π-тип, добуток типів; англ. product type) — конструкція у мовах програмування й інтуїціоністській теорії типів, тип даних, побудований як декартів добуток початкових типів; іншими словами — кортеж типів, чи «кортеж як тип». Використані типи і порядок їх слідування визначають типу-добутку; порядок проходження об'єктів у створюваному кортежі зберігається протягом його часу життя відповідно до заданої сигнатури. Наприклад, якщо типи <i>A</i> і <i>B</i> є множинами значень <i>a</i> і <i>b</i> відповідно, то складений з них декартів добуток записується як <i>A</i>×<i>B</i>, і отриманий тип-добуток являє собою множину можливих пар (<i>a</i>,<i>b</i>). (uk)
|
rdfs:comment
|
- In programming languages and type theory, a product of types is another, compounded, type in a structure. The "operands" of the product are types, and the structure of a product type is determined by the fixed order of the operands in the product. An instance of a product type retains the fixed order, but otherwise may contain all possible instances of its primitive data types. The expression of an instance of a product type will be a tuple, and is called a "tuple type" of expression. A product of types is a direct product of two or more types. (en)
- Тип-произведение (также Π-тип, произведение типов; англ. product type) — конструкция в языках программирования и интуиционистской теории типов, тип данных, построенный как декартово произведение исходных типов; другими словами — кортеж типов, или «кортеж как тип». Использованные типы и порядок их следования определяют типа-произведения; порядок следования объектов в создаваемом кортеже сохраняется на протяжении его времени жизни согласно заданной сигнатуре. (ru)
- Тип-добуток (також Π-тип, добуток типів; англ. product type) — конструкція у мовах програмування й інтуїціоністській теорії типів, тип даних, побудований як декартів добуток початкових типів; іншими словами — кортеж типів, чи «кортеж як тип». Використані типи і порядок їх слідування визначають типу-добутку; порядок проходження об'єктів у створюваному кортежі зберігається протягом його часу життя відповідно до заданої сигнатури. (uk)
|