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

Shivkumar Chandrasekaran shiv at ece.ucsb.edu
Wed Aug 22 22:12:08 MEST 2007


Resuming my previous thread on access to external commands in Clean.

It would be really nice to have access to a function like  
(createWorld :: *World) that returned a brand new world (equivalent  
to say a new partition on the hard disk) but more like how  
createArray returns a fresh unique array. It seems it would be really  
nice to live in a many worlds universe :-)

For example, I was requesting that we have a function to execute  
external command-line utilities:

command :: {#Char} *World -> (Int, *World)

However, if I use this deep inside my code somewhere, I *must* thread  
*World all the way from Start to my local call site. (This happens in  
Haskell I believe). However, if I can create local unique Worlds  
(just like unique arrays), I can avoid this situation.

Similarly, in my work (numerical solution of PDEs), I often need to  
manipulate large quantities of intermediate data (matrix  
factorizations, and so forth), which I would like to store in  
external files rather than in memory. Even though these calculations  
are deep inside my code, I must still thread *World all the way in.  
Again, it would be nice not to have to do that. If createWorld could  
give me a fresh virtual partition of the hard disk, this problem  
could be solved easily.

--shiv--

PS: Of course the user should not expect any synchronization between  
multiple *World's, especially for GUIs.




More information about the clean-list mailing list