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
Strange performances
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-01-18 (17:52)
From: Kuba Ober <ober.14@o...>
Subject: Re: [Caml-list] Strange performances
On Friday 18 January 2008, Edgar Friendly wrote:
> Jacques Garrigue wrote:
> > This is why I sent an erratum. The cause for the segfault was not the
> > array access, but the stack overflow, which occured due to ocaml's
> > peculiar evaluation order.
> Is there any case where ocaml's "peculiar evaluation order" results in
> any benefit other than slightly simpler code at the compiler level?  I
> understand that people shouldn't depend on evaluation order, but it
> seems that people fall into this trap often.  And even extremely
> experienced camlers (if you permit this characterization of you) forget
> this behavior.

I think that if you apply principle of least astonishment, things should be 
evaluated left-to-right. Or at least with a consistent rule.

Cheers, Kuba