Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
To: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>, caml-list@inria.fr
Subject: Re: [Caml-list] Strange performances
Date: Thu, 24 Jan 2008 23:52:28 +0100	[thread overview]
Message-ID: <479916AC.8040005@univ-savoie.fr> (raw)
In-Reply-To: <20080119.113243.267873825.garrigue@math.nagoya-u.ac.jp>


> The downside of such an approach would be different evaluation orders
> for data constructors and functions. There is no theoretical problem
> in it, since they form different syntactic classes in ocaml, but
> people may not be completely aware of that.
>
>   
There is already a mixed evaluation order in OCaml :
"&&", "||", ";", ... are left to right (and the logical connective are 
lazy moreover)
So left to right everywhere except in function applications would be the 
simplest
deterministic strategy for OCaml ...

The current situation with OCaml unspecified evaluation order is really 
not satisfactory.
Let aside that it makes proving code more difficult (more cases to check).
But, even if you try to make your code independant from the evaluation 
order ...
how can you be sure ? This would require a random evaluation order to 
catch your potential bugs.
(like the old days Apple's SANE library with a random least significant 
bit to know how your
computation depends on rounding errors, I am missing that one ;-)
> Another unrelated problem seldom noted is that for records, the
> evaluation order is that of the record definition, not that used when
> creating it. And the same thing is true for labelled functions.
> So you cannot expect the evaluation order to be exactly the one
> appearing in the code.
>   
Argh ! Not nice that one ? For what reasons ?

Best regards,
Christophe


      reply	other threads:[~2008-01-24 22:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18  1:32 Benjamin Canou
2008-01-18  2:15 ` [Caml-list] " Jacques Garrigue
2008-01-18  2:28   ` Jacques Garrigue
2008-01-18  7:39   ` Till Varoquaux
2008-01-18  9:12     ` Jacques Garrigue
2008-01-18 16:55       ` Benjamin Canou
2008-01-18 17:05         ` Olivier Andrieu
2008-01-18 17:11           ` Jon Harrop
2008-01-18 17:43         ` Jon Harrop
2008-01-18 19:53           ` Benjamin Canou
2008-01-18 16:55       ` Edgar Friendly
2008-01-18 17:52         ` Kuba Ober
2008-01-18 17:56           ` Jon Harrop
2008-01-19  2:32         ` Jacques Garrigue
2008-01-24 22:52           ` Christophe Raffalli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=479916AC.8040005@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --cc=caml-list@inria.fr \
    --cc=garrigue@math.nagoya-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox