From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA10250; Sun, 26 Oct 2003 16:28:14 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA14162 for ; Sun, 26 Oct 2003 16:28:12 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h9QFSC104524 for ; Sun, 26 Oct 2003 16:28:12 +0100 (MET) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1ADmoL-0002A5-00 for ; Sun, 26 Oct 2003 15:28:09 +0000 Date: Sun, 26 Oct 2003 15:28:08 +0000 To: caml-list@inria.fr Subject: Re: [Caml-list] Missing tabs Message-ID: <20031026152808.GA8280@redhat.com> References: <20031026115935.GA6205@redhat.com> <20031026121758.GA23309@clipper.ens.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20031026121758.GA23309@clipper.ens.fr> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 brumaire:01 printf:01 foo:01 baz:01 faq:01 printf-like:01 printf:01 faq:01 violate:01 bug:01 freshmeat:01 autoconf:01 automake:01 compiles:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, Oct 26, 2003 at 01:17:58PM +0100, Nicolas George wrote: > Le quintidi 5 brumaire, an CCXII, Richard Jones a 'ecrit: > > # List.iter (printf "\t%s\n") ["foo"; "bar"; "baz"; "buz"];; >=20 > This is a FAQ: you can not partially apply the format string of > printf-like functions. Try (fun x -> printf "\t%s\n" x) instead. I've now read: http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html#printf thanks. Hmmm ... This does appear to violate the principle of least surprise. So: let g =3D Printf.printf " ** %i";; is supposed to be equivalent to: let g =3D print_string " ** "; fun i -> print_int i;; I would say that it should be equivalent to: let g =3D fun i -> (print_string " ** "; print_int i);; and that the other behaviour is a bug, even if there are implementation reasons why it is otherwise ... Just my EUR 0.02. Rich. --=20 Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - all your business data are belong to y= ou. MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles, RPMs, pkgs etc. Linux, BSD, Solaris. http://www.annexia.org/freeware/makepl= us/ ------------------- 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