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: -- (:)
From: Dave Mason <dmason@s...>
Subject: Re: [Caml-list] Evaluation Order
>>>>> On Sat, 9 Jun 2001 19:25:01 -0700, "David McClain" <> 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 ....


> 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.

Bug reports:  FAQ:
To unsubscribe, mail  Archives: