caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christian Lindig <lindig@ips.cs.tu-bs.de>
To: John Prevost <prevost@maya.com>
Cc: caml-list@inria.fr
Subject: Re: another approach to sprintf (Re: ocaml 2.02 bug: curried printf)
Date: Thu, 25 Mar 1999 14:29:01 +0100	[thread overview]
Message-ID: <19990325142901.B3236@ips.cs.tu-bs.de> (raw)
In-Reply-To: <ya2pv5ywuem.fsf@zarya.maya.com>; from John Prevost on Wed, Mar 24, 1999 at 02:37:53PM -0500

    +-- Xavier Leroy
    | It's a cute trick. One drawback is that the format is not a
    | character string, but needs to be expressed using special
    | functions and infix operators.

    +-- John Prevost
    | It does, however, mean that people can extend the set of patterns
    | that can be used in printf in a more palatable way than the
    | %a mechanism. Especially with neat things like Danvy's "lis"
    | combinator.

The suggested functional approach to printf has another possible
drawback:  when you want to express all the options like "%5.5f"
possible in C style printf formatting you need a whole bunch of
functions.  Since OCaml has no overloading a single `float' function
for floats can not capture them all. 

-- Christian

-- 
 Christian Lindig   Technische Universitaet Braunschweig, Germany
                    http://www.cs.tu-bs.de/softech/people/lindig
                    lindig@ips.cs.tu-bs.de




  reply	other threads:[~1999-03-25 18:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-06  1:38 ocaml 2.02 bug: curried printf William Chesters
1999-03-12 15:00 ` Xavier Leroy
1999-03-12 15:31   ` William Chesters
1999-03-19  8:47   ` another approach to sprintf (Re: ocaml 2.02 bug: curried printf) Eijiro Sumii
1999-03-23 16:17     ` Xavier Leroy
1999-03-24 19:37       ` John Prevost
1999-03-25 13:29         ` Christian Lindig [this message]
1999-03-25 20:52           ` John Prevost
1999-03-29 16:31         ` Xavier Leroy
1999-03-24 23:48       ` Frank A. Christoph

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=19990325142901.B3236@ips.cs.tu-bs.de \
    --to=lindig@ips.cs.tu-bs.de \
    --cc=caml-list@inria.fr \
    --cc=prevost@maya.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).