From: Francois-Rene Rideau <fare@tunes.org>
To: caml-list@inria.fr
Subject: [Caml-list] printf and scanf
Date: Wed, 1 May 2002 20:00:53 +0200 [thread overview]
Message-ID: <20020501180052.GA13445@hell.mine.nu> (raw)
Jerome Marant wrote:
There are some cases where you may know the format string
only at runtime; the most obvious example is internationalization
through something like gettext.
Rather, the format strings are known at compile-time,
but you don't know which string will be used.
So you can precompile all strings, and
select the right formatter at run-time.
Even if you want to do things at runtime, you can compile the default
string at compile-time, and then you know the type to expect.
Switching strings can then be done in a type-safe way: throw an exception
if the type of the replacement string's compiled printer doesn't match.
You'll need this type of mechanism, anyway.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
[ TUNES project for a Free Reflective Computing System | http://tunes.org ]
Guns & bullets don't kill people -- blood loss and organ damage kills people.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next reply other threads:[~2002-05-02 6:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-01 18:00 Francois-Rene Rideau [this message]
2002-05-02 8:25 ` Jérôme Marant
2002-05-02 16:11 ` Pixel
2002-05-02 17:50 ` Jérôme Marant
2002-05-02 17:09 ` John Prevost
2002-05-02 17:52 ` Jérôme Marant
-- strict thread matches above, loose matches on Subject: below --
2002-04-30 13:51 Francois-Rene Rideau
2002-05-01 16:06 ` Jérôme Marant
2002-05-02 6:55 ` Francois Pottier
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=20020501180052.GA13445@hell.mine.nu \
--to=fare@tunes.org \
--cc=caml-list@inria.fr \
/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