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:
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.
- lazy evaluation:
nothing is created until it is needed
- 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.
- metaperl's blog
- Login to post comments
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).
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.