From: pierre.weis@inria.fr (Pierre Weis)
To: "Bünzli Daniel" <daniel.buenzli@erratique.ch>
Cc: caml-list List <caml-list@inria.fr>
Subject: Re: [Caml-list] OCaml's formatting libraries
Date: Tue, 13 Nov 2007 09:53:30 +0100 [thread overview]
Message-ID: <20071113085329.GA20423@yquem.inria.fr> (raw)
In-Reply-To: <92C50802-AFEE-4CD4-9F47-FBC9BCABC7A1@erratique.ch>
[...]
> A question I have is why caml's formatting libraries were not
> deprecated in favor of an implementation using Danvy's functional
> unparsing [1]. This approach doesn't require an extension to the type
> system and if I read correctly these results [2] it seems at least as
> efficient as the current implementation. Scanf seems also doable [3].
If this functional unparsing can be rendered fully backward compatible with
the existing printf and scanf related Caml users' code base, then we can give
it a try. Otherwise, we would have to maintain two libraries in parallel...
> The less complexity there is in the type system the safer we are in
> the end.
The type system is not modified. We just have to add a new basic
(polymorphic) type constant to the set of basic types; and the corresponding
constant values are then type checked using the plain old polymorphic type
algebra.
The problem we have with the dynamic format strings compatibility check is
similar to any other bug into any other basic Caml primitive: a bug in those
primitives can be fatal to the type safety. (The bug in the compatibility
check has similar consequences as would a bug in the implementation of the
int_of_string primitive, if int_of_string were erroneously returning a float
value in some rare cases, while still keeping the regular string -> int type
scheme.)
All the best,
--
Pierre Weis
INRIA Rocquencourt, http://bat8.inria.fr/~weis/
prev parent reply other threads:[~2007-11-13 8:53 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 14:17 Search for the smallest possible possible Ocaml segfault Till Varoquaux
2007-11-08 15:00 ` [Caml-list] " Jean-Christophe Filliâtre
2007-11-08 15:17 ` Till Varoquaux
2007-11-08 15:55 ` Adrien
2007-11-08 16:05 ` Alain Frisch
2007-11-08 16:30 ` Feature request (was Re: [Caml-list] Search for the smallest possible possible Ocaml segfault....) Martin Jambon
2007-11-08 18:23 ` Martin Jambon
2007-11-08 16:07 ` [Caml-list] Search for the smallest possible possible Ocaml segfault Jeremy Yallop
2007-11-08 16:11 ` Jeremy Yallop
2007-11-08 16:17 ` Till Varoquaux
2007-11-08 17:02 ` Stefano Zacchiroli
2007-11-08 17:10 ` Till Varoquaux
2007-11-08 17:02 ` Pascal Zimmer
2007-11-08 17:12 ` Oliver Bandel
2007-11-08 17:11 ` Oliver Bandel
2007-11-08 17:13 ` Zheng Li
2007-11-08 17:55 ` [Caml-list] STOP (was: Search for the smallest possible possible Ocaml segfault) Xavier Leroy
2007-11-08 18:11 ` Tom Primožič
2007-11-08 18:23 ` [Caml-list] STOP Robert Fischer
2007-11-08 19:01 ` Basile STARYNKEVITCH
2007-11-08 18:31 ` [Caml-list] STOP (was: Search for the smallest possible possible Ocaml segfault) Till Varoquaux
2007-11-08 19:06 ` Oliver Bandel
2007-11-09 18:09 ` Pierre Weis
2007-11-10 14:32 ` OCaml's formatting libraries Bünzli Daniel
2007-11-10 14:58 ` [Caml-list] " Jon Harrop
2007-11-10 15:43 ` Bünzli Daniel
2007-11-10 19:13 ` Jon Harrop
2007-11-13 9:22 ` Pierre Weis
2007-11-13 9:13 ` Pierre Weis
2007-11-13 8:53 ` Pierre Weis [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=20071113085329.GA20423@yquem.inria.fr \
--to=pierre.weis@inria.fr \
--cc=caml-list@inria.fr \
--cc=daniel.buenzli@erratique.ch \
/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