caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: David Allsopp <dra-news@metastack.com>
Cc: OCaML List Mailing <caml-list@inria.fr>
Subject: Re: [Caml-list] ocaml considered dangerous
Date: Sat, 18 Jan 2014 10:28:47 +0100	[thread overview]
Message-ID: <CAPFanBGg_a2FYgEi0aFEZOaOu_BuyZPYTHR1=rBzX_k+Dm0r2A@mail.gmail.com> (raw)
In-Reply-To: <E51C5B015DBD1348A1D85763337FB6D9E02E160F@Remus.metastack.local>

No, it does not. It makes the printf codebase easier to work with (if
you know your GADTs), but lately the tendency has rather been to hope
for *less* complex stuff in formats, rather than more.

On Sat, Jan 18, 2014 at 10:11 AM, David Allsopp <dra-news@metastack.com> wrote:
> Does this new version fix positional specifiers? (http://caml.inria.fr/mantis/view.php?id=4204) or has that rather useful (if never working!) feature been consigned to history?
>
>> -----Original Message-----
>> From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] On
>> Behalf Of Gabriel Scherer
>> Sent: 18 January 2014 07:05
>> To: Jeremy Yallop
>> Cc: Jon Harrop; Jacques Garrigue; OCaML List Mailing
>> Subject: Re: [Caml-list] ocaml considered dangerous
>>
>> 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
>>
>> --
>> 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
>
> --
> 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

  reply	other threads:[~2014-01-18  9:29 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
2014-01-18  9:11         ` David Allsopp
2014-01-18  9:28           ` Gabriel Scherer [this message]
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='CAPFanBGg_a2FYgEi0aFEZOaOu_BuyZPYTHR1=rBzX_k+Dm0r2A@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=dra-news@metastack.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).