Browse thread
[Caml-list] 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: | Dave Mason <dmason@s...> |
| Subject: | Re: [Caml-list] Evaluation Order |
>>>>> On Sat, 9 Jun 2001 19:25:01 -0700, "David McClain" <dmcclain1@mindspring.com> said: > I had just thought of a similar solution myself, but I wouldn't be > so strict as to disallow any use in an expression. Rather, as long > as only one such function call exists in any one expression it would > be okay. That would allow things like > let ans = prev_ans + process_tail() in .... Yes. > It does sound like an easy solution, so knowing myself as I do, I am > wondering what I don't understand about the details... If it were so > easy, then why hasn't it been done yet? I think the answer is that the ``effect''ness isn't simply captured in the type. So the current type-inference engine would not be able to do it. It would require a bit of ad-hocery in the compiler. That doesn't mean that it's unsound, just that the existing compiler mechanisms couldn't do it. ../Dave ------------------- 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