Product type

Product type

In programming languages, the product of two types is the type that characterizes the expressions which behaves, with respect to the evaluation mechanism, as pairs whose first component is an expression of the first type and whose second component is an expression of the second 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.

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.

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.


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Product type —   Product type indicates the kind of product, e.g. Saving account, Outgoing Transfer, Short Term Loan, Time Deposit, etc …   International financial encyclopaedia

  • Product Red — Product Red, styled as (PRODUCT)RED, is a brand licensed to partner companies such as Nike, American Express (UK), Apple Inc., Starbucks, Converse, Bugaboo, Penguin Classics (UK International), Gap, Emporio Armani, Hallmark (US) and Dell. It was… …   Wikipedia

  • Product fee account information —   Branch product fee account information. The information related to a fee type for a particular product type in a branch. Apart from defining the transaction types which this fee type will produce you must also define to the system what account… …   International financial encyclopaedia

  • Type —   A common systems term. It just means a group. See also Party type, account type, Product type, transaction type, etc.   A classification.   See also Account type, transaction type and Product type …   International financial encyclopaedia

  • Product (album) — Infobox Album Name = Product Type = studio Longtype = Artist = De Press Released = 1982 Recorded = Genre = Post punk Length = 35:19 Label = Producer = Reviews = Last album = This album = Next album = Product is the second album by Norwegian group …   Wikipedia

  • Product (Brand X album) — Infobox Album | Name = Product Type = Album Artist = Brand X Released = 1979 Recorded = Startling Studios, Ascot, UK, April 1979 Producer = Brand X, Colin Green Genre = Jazz fusion Label = Charisma Records Last album = Masques This album =… …   Wikipedia

  • Product integral — Product integrals are a counterpart of standard integrals of infinitesimal calculus. They were first developed by the mathematician Vito Volterra in 1887 to solve systems of linear differential equations. Since then, product integrals have found… …   Wikipedia

  • product — prod‧uct [ˈprɒdʌkt ǁ ˈprɑː ] noun 1. [countable] COMMERCE something useful and intended to be sold that comes from nature or is made in a factory: • Distributors for Amway sell numerous products, including cleaning and personal care products …   Financial and business terms

  • Type approval — is granted to a product that meets a minimum set of regulatory, technical and safety requirements. Generally, type approval is required before a product is allowed to be sold in a particular country, so the requirements for a given product will… …   Wikipedia

  • Product placement — Product placement, or embedded marketing, [cite web last = Schiller first = Gail authorlink = coauthors = title = Win, draw for Burnett branding work = publisher = The Hollywood Reporter date = 2005 06 01 url =… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”