[clean-list] Wish list =+ New *World

Shivkumar Chandrasekaran shiv at ece.ucsb.edu
Thu Aug 23 01:18:22 MEST 2007


Good point! How about createFiles ::  *Files at least then (with  
*Files being empty when first created so we cannot pull anything out  
of the hat here)?

--shiv--

On Aug 22, 2007, at 2:19 PM, Edsko de Vries wrote:

> Clean is a pure functional language. If you want to have side  
> effects at
> arbitrary places in your code, you should use something like OCaml.  
> The
> whole point of a *Unique* world is that it is *Unique*. If one could
> create worlds at arbitrary places, referential transparency (the  
> 'pure'
> in pure functional) is lost. For example, I could easily write a
> function such as:
>
> getInt :: Integer
> getInt = getTime createWorld
>
> (assuming a function getTime :: *World -> Int)
>
> Once I can write this function, all the nice properties that come  
> with pure functional languages are lost. For example, I can no  
> longer assume that
>
> forall (i :: Integer), i + i = 2 * i
>
> because
>
>   getInt + getInt /= 2 * getInt
>
> Edsko



More information about the clean-list mailing list