From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Jeremy Yallop <yallop@gmail.com>
Cc: Jon Harrop <jon@ffconsultancy.com>,
Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>,
OCaML List Mailing <caml-list@inria.fr>
Subject: Re: [Caml-list] ocaml considered dangerous
Date: Sat, 18 Jan 2014 08:04:44 +0100 [thread overview]
Message-ID: <CAPFanBEoZksLoahT3wQH-gU47JUgQXOYDUTYRbYbDoqtrPoS3Q@mail.gmail.com> (raw)
In-Reply-To: <CAAxsn=HWEd-rnqYbUobjcSMF6xn8farz76bfKd84uEzCpSqJOw@mail.gmail.com>
I guess one could also mention that the no-magic implementation is
notably faster than the current implementation (as it avoids any
format string parsing at runtime), which is not necessarily a concern
for printf (for large output you're probably killed by I/O overhead
anyway) but can be for sprintf or bprintf.
Note that while the current proposal uses GADTs, Benoît also
experimented with reasonable similar designs using higher-order
function (this is the usual initial vs. final tagless interpreter
choice) that would have been implementable before 4.00.
On Sat, Jan 18, 2014 at 3:22 AM, Jeremy Yallop <yallop@gmail.com> wrote:
> Jacques Garrigue wrote:
>>> By the way, there is now an implementation of Printf that avoids most of the Obj.magic by using GADTs. It should be merged soon.
>
> Jon Harrop <jon@ffconsultancy.com> wrote:
>> Just curious: is that a drop-in replacement?
>
> Yes, except for some tiny incompatibilities, mostly fixes for bugs
> that the development of the GADT version uncovered in the original
> implementation. The patch is here, along with a description and some
> discussion:
>
> http://caml.inria.fr/mantis/view.php?id=6017
>
> The author, Benoît Vaugon, presented the design along with some
> performance figures at OCaml 2013:
>
> http://ocaml.org/meetings/ocaml/2013/proposals/formats-as-gadts.pdf
> http://ocaml.org/meetings/ocaml/2013/slides/vaugon.pdf
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
next prev parent reply other threads:[~2014-01-18 7:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 23:00 Jürgen Pfitzenmaier
2014-01-16 23:27 ` Milan Stanojević
2014-01-16 23:33 ` Daniel Bünzli
2014-01-17 0:43 ` Nicolas Braud-Santoni
2014-01-20 10:07 ` Goswin von Brederlow
2014-01-17 2:12 ` Jeff Meister
2014-01-17 2:38 ` Jacques Garrigue
2014-01-17 9:01 ` Gabriel Scherer
2014-01-18 0:39 ` Jon Harrop
2014-01-18 2:22 ` Jeremy Yallop
2014-01-18 7:04 ` Gabriel Scherer [this message]
2014-01-18 9:11 ` David Allsopp
2014-01-18 9:28 ` Gabriel Scherer
2014-01-18 9:43 ` David Allsopp
2014-01-18 9:59 ` Gabriel Scherer
2014-01-19 6:09 ` oleg
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=CAPFanBEoZksLoahT3wQH-gU47JUgQXOYDUTYRbYbDoqtrPoS3Q@mail.gmail.com \
--to=gabriel.scherer@gmail.com \
--cc=caml-list@inria.fr \
--cc=garrigue@math.nagoya-u.ac.jp \
--cc=jon@ffconsultancy.com \
--cc=yallop@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