caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: Spiros Eliopoulos <seliopou@gmail.com>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] ANN: angstrom
Date: Mon, 25 Jul 2016 22:03:48 +0200	[thread overview]
Message-ID: <FC7E109B81C846B19DAD3C0A5652C518@erratique.ch> (raw)
In-Reply-To: <CAEkQQgJ-bQEPUew1B9eV9-24z3Zd_Ff8=do3uE3V6sbRPeK1Gw@mail.gmail.com>



Le lundi, 25 juillet 2016 à 21:37, Spiros Eliopoulos a écrit :

> While such a design sometimes benefits the system _as a whole_, it certainly comes at a cost. In the case where clients are meant to explicitly handle parse errors and restart the parse _through control inversion_, the cost is the compositionality.

[…]
> For supporting composition, it's certainly better than control inversion.

The point is that clients are usually parsers themselves. You are not actually loosing compositionnality by supporting what you call "control inversion", you are increasing it by allowing the parsers to be used differently according to the context.  

A simple example is contrasting parsing gigabytes of geojson data where I might not consider an error of the underlying character stream as a catastrophic error and opt to continue the decode versus an implementation of the JOSE framework in which I really want to treat any sort of error as a catastrophic one.  

Best,

Daniel



  reply	other threads:[~2016-07-25 20:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 13:35 Spiros Eliopoulos
2016-07-22 14:38 ` Daniel Bünzli
2016-07-22 21:46   ` Spiros Eliopoulos
2016-07-23  2:17     ` Daniel Bünzli
2016-07-23  6:41       ` Cole Brown
2016-07-23 11:37         ` Daniel Bünzli
2016-07-25 14:15       ` Spiros Eliopoulos
2016-07-25 15:44         ` Daniel Bünzli
2016-07-25 16:07           ` Spiros Eliopoulos
2016-07-25 16:21             ` Daniel Bünzli
2016-07-25 19:37               ` Spiros Eliopoulos
2016-07-25 20:03                 ` Daniel Bünzli [this message]
2016-10-13 12:42 ` Anil Madhavapeddy
2017-02-03 19:37 ` Hendrik Boom
2017-02-04 16:36   ` Spiros Eliopoulos

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=FC7E109B81C846B19DAD3C0A5652C518@erratique.ch \
    --to=daniel.buenzli@erratique.ch \
    --cc=caml-list@inria.fr \
    --cc=seliopou@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).