Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Evaluation Order
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Patrick M Doane <patrick@w...>
Subject: Re: [Caml-list] Evaluation Order
It sounds like a lot of what you're describing comes with Haskell's
monadic IO system.  If you have an expression

  e1 +  e2

where e1 and e2 could be side effecting expressions, the type system
forces you to write:

do v1 <- e1
   v2 <- e2
   return v1 + v2

If you're already familiar with Haskell, were there additional properties
you were looking for?

Patrick

On Sat, 9 Jun 2001, David McClain wrote:

> Earlier, I stated that there were no reference vars in the program. That's
> strictly true only of the OCaml portion of the code. However, the C/C++ core
> does maintain a mutable state and that is the reason for evaluation order
> dependencies.
> 
> It would seem that the compiler could automatically spot side effecting
> functions and propagate that attribute by noticing when reference vars are
> modified, when arrays and structures are mutated, etc. Hence explicit
> declaration should be unnecessary -- except! for those declared "external"
> routines that have side effects. Those need to be flagged explicitly to the
> compiler.
> 
> - DM
> 
> 
> -------------------
> Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
> To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr
> 

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr