Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2001-06-10 (02:49)
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?


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:  FAQ:
> To unsubscribe, mail  Archives:

Bug reports:  FAQ:
To unsubscribe, mail  Archives: