Browse thread
Parameter evaluation order
-
Márk_S._Zoltán
- Alain Frisch
-
Damien Doligez
-
skaller
- Damien Doligez
- Hao-yang Wang
-
skaller
[
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: | Damien Doligez <damien.doligez@i...> |
| Subject: | Re: [Caml-list] Parameter evaluation order |
On Aug 23, 2005, at 09:12, skaller wrote: > On Mon, 2005-08-22 at 18:50 +0200, Damien Doligez wrote: > > > > >> Suppose you want to evaluate a curried function call in left-to-right >> order: >> f e1 e2 e3 e4 >> >> You must evaluate f first, then e1. Then you must apply f to e1, >> giving >> a new function g1. Then you must evalue e2, then apply f1 to e2, >> giving >> f2, etc. >> >> That's because f might do some side effects between its arguments. >> >> >> > > what data, and possibly annotations, would be required to solve this > problem? > > The most direct solution is to introduce the notion of function arity in the type system. As far as I know, there is no theoretical difficulty, the biggest problem is to find a syntax that satisfies everyone... -- Damien