AUM : Creation, Maintenance, Destruction

Submitted by metaperl on Sun, 05/29/2005 - 8:42pm.

All phenomena, including computational acts, are acts of creation, maintenance, or destruction. Haskell contains a number of well designed creative acts:

  1. type constructors:

    c1 :: Contract
    c1 = zcb (date "1 Jan 2001") 100 Pounds
    zcb :: Date -> Float -> Currency -> Contract
    -- Zero coupon bond

    Pounds is a type constructor in the above... and zcb creates values of a certain type.

  2. lazy evaluation:

    nothing is created until it is needed

  3. list comprehensions

    concise ways to stating how a list is created.

Destruction is handled via automatic garbage control. There is little support for loading up and Maintaining data in-memory.

Submitted by Stefan Holdermans (not verified) on Mon, 05/30/2005 - 12:38am.

Maybe I'm missing something, but isn't Pounds a data constructor rather than a type constructor? Currency is a type constructor (although some people reserve the word type constructor for types of higher arity).

Submitted by shapr on Tue, 05/31/2005 - 9:04am.

Have you read the Bananas, Lenses, Barbed Wire, Envelopes series of papers yet? They focus on the very most basic patterns of creation, destruction, and change.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.