Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Printing text with holes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] Printing text with holes
On Mon, 29 Sep 2003, Jean-Marc EBER wrote:

> With "old" printf approach, you write something like:
> let _ =
>    printf "Hello %s %s! It is %i o'clock.\n" first_name last_name time

It also allows you to do:

let _ = printf "Hello %s %s! It is %i o'clock.\n" name time

To detect this is a problem, the compiler has to not only parse Ocaml, it 
also has to parse printf format strings.

The one advantage that printf has is familiarity.  All of us who are old C 
programmers (and I fall into this category) know printf.  But that doesn't 
make it a good interface.

Brian


-------------------
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