Browse thread
RE: Undefined evaluation order
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe Raffalli <Christophe.Raffalli@u...> |
| Subject: | Re: Undefined evaluation order |
It seems to me that a program making use of evaluation order in function or constructor application is wrong ! It seems easy to me to add some marking in the type system to detect expression with side effects ... then one could have a warning (or even an error :-) when some code depends on evaluation order and then, in this case only, force left to right evaluation order. I am sure I would find some bugs in my programs with such a warning :-) What do think the OCaml's developpers about this ? Note: the problem of List.map is different and the library should specify an evaluation order (there could be even two versions of List.map and List.iter) -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI