From: Arnaud Spiwack <aspiwack@lix.polytechnique.fr>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: OCaML Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Purity in ocaml
Date: Thu, 23 Jan 2014 10:35:14 +0100 [thread overview]
Message-ID: <CAMoPVjf3FQcw9yEMH9Dz80JPpTa8yLhDruN9_3LRhhN06De6ow@mail.gmail.com> (raw)
In-Reply-To: <20140123092009.GA20624@frosties>
[-- Attachment #1: Type: text/plain, Size: 567 bytes --]
> On the other hand if types are annotated with the exceptions they
> throw then they become just another return value and become pure.
> Same input, same exception every time.
>
As far as Yotam Barnoy's goal is concerned, this isn't true. He wants to be
able to use purity annotations for optimisation: a most typical
optimisation which is valid only for pure functions is to rewrite *map f
(map g l)* into *map (f∘g) l*. This optimisation, as it happens, is not
valid with exception throwing functions as it may very well throw a
different exception.
[-- Attachment #2: Type: text/html, Size: 820 bytes --]
next prev parent reply other threads:[~2014-01-23 9:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 20:45 Yotam Barnoy
2014-01-20 21:08 ` Siraaj Khandkar
2014-01-20 21:16 ` Yotam Barnoy
2014-01-20 21:31 ` Siraaj Khandkar
2014-01-20 21:43 ` Yotam Barnoy
2014-01-20 22:55 ` Siraaj Khandkar
2014-01-21 1:37 ` Yotam Barnoy
2014-01-21 9:49 ` Goswin von Brederlow
2014-01-21 15:27 ` Yotam Barnoy
2014-01-23 9:20 ` Goswin von Brederlow
2014-01-23 9:35 ` Arnaud Spiwack [this message]
2014-01-27 9:32 ` Goswin von Brederlow
2014-01-28 9:21 ` Arnaud Spiwack
2014-02-01 14:52 ` Goswin von Brederlow
2014-02-03 9:20 ` Arnaud Spiwack
2014-01-23 18:18 ` Yotam Barnoy
2014-01-27 9:46 ` Goswin von Brederlow
2014-01-29 17:16 ` Yotam Barnoy
2014-02-01 15:03 ` Goswin von Brederlow
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=CAMoPVjf3FQcw9yEMH9Dz80JPpTa8yLhDruN9_3LRhhN06De6ow@mail.gmail.com \
--to=aspiwack@lix.polytechnique.fr \
--cc=caml-list@inria.fr \
--cc=goswin-v-b@web.de \
/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