DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

John A. De Goes john at n-brain.net
Thu Aug 13 09:19:54 EDT 2009


> What if you have another program, written in C or something, that  
> monitors a file for changes, and if so changes the contents of  
> another file? Surely to catch that you must mark *all* file system  
> access as "interefering"? Even worse, another program could monitor  
> the state of a file and conditionally disable thet network driver,  
> now file access interferes with network access.


A compiler or runtime system can't know about these kinds of things --  
unless perhaps you push the effect system into the operating system  
(interesting idea). The best you can do is ensure the program itself  
is correct in the absence of interference from other programs, but  
there's no way to obtain a guarantee in the presence of interference.  
Either with an effect system, or without (think of all the sequential  
imperative code that gets broken when other programs concurrently  
tamper with the file system or networking, etc.).

Regards,

John A. De Goes
N-Brain, Inc.
The Evolution of Collaboration

http://www.n-brain.net    |    877-376-2724 x 101

On Aug 13, 2009, at 2:42 AM, Sebastian Sylvan wrote:

>
>
> On Thu, Aug 13, 2009 at 4:56 AM, John A. De Goes <john at n-brain.net>  
> wrote:
>
> The next step is to distinguish between reading file A and reading  
> file B,
> between reading file A and writing file A, between reading one part  
> of file A and writing another part of file A, etc. When the effect  
> system can carry that kind of information, and not just for files,  
> but network, memory, etc., then you'll be able to do some extremely  
> powerful parallelization & optimization.
>
> What if you have another program, written in C or something, that  
> monitors a file for changes, and if so changes the contents of  
> another file? Surely to catch that you must mark *all* file system  
> access as "interefering"? Even worse, another program could monitor  
> the state of a file and conditionally disable thet network driver,  
> now file access interferes with network access.
>
>
> -- 
> Sebastian Sylvan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090813/769e36e6/attachment.html


More information about the Haskell-Cafe mailing list