From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 53BCA7EFCD for ; Mon, 27 Oct 2014 18:56:29 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.148.100; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of dra-news@metastack.com designates 62.13.148.100 as permitted sender) identity=mailfrom; client-ip=62.13.148.100; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@outmail148100.authsmtp.co.uk) identity=helo; client-ip=62.13.148.100; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail148100.authsmtp.co.uk"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkADABCGTlQ+DZRkl2dsb2JhbABcvggGnFYWAREBAQEBAQYYB0KECQMFAh4STAUWUiMcAQQeBYg1pzKkVoY0jyYFkgddon0BAQGCI4M3AQEB X-IPAS-Result: AkADABCGTlQ+DZRkl2dsb2JhbABcvggGnFYWAREBAQEBAQYYB0KECQMFAh4STAUWUiMcAQQeBYg1pzKkVoY0jyYFkgddon0BAQGCI4M3AQEB X-IronPort-AV: E=Sophos;i="5.04,797,1406584800"; d="scan'208";a="103214576" Received: from outmail148100.authsmtp.co.uk ([62.13.148.100]) by mail2-smtp-roc.national.inria.fr with ESMTP; 27 Oct 2014 18:56:28 +0100 Received: from mail-c235.authsmtp.com (mail-c235.authsmtp.com [62.13.128.235]) by punt15.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s9RHuRRf082372 for ; Mon, 27 Oct 2014 17:56:27 GMT Received: from romulus.metastack.com (cpc1-cmbg5-0-0-cust241.5-4.cable.virginm.net [81.98.252.242]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s9RHuOUd090983 for ; Mon, 27 Oct 2014 17:56:24 GMT Received: from Altus ([213.205.236.126]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id s9RHuLi4002749 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 27 Oct 2014 17:56:23 GMT From: "David Allsopp" To: "OCaml List" Date: Mon, 27 Oct 2014 17:56:28 -0000 Organization: MetaStack Solutions Ltd. Message-ID: <000001cff20f$57052560$050f7020$@metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac/yDbyhvUTafw2gSgqXw86dZ0gNXA== Content-Language: en-gb X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 91486c85-5e02-11e4-b396-002590a15da7 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNlEAUAAU NkdBMnJSNkcdTBdX QSgJXEsrAxluW2N0 bxpQag9YZEBMW0ti UVZASkxQEQd2AxgD GRwbTRk8NAwkADsP ABJiV3BSVEc0dEV1 QABdFGkOYzRobX0a BUBaagJVJQdXLBxM bE1/VHEIaGVWZ380 FlAlATk+NC9eJT8d RQ9FFUgTR1oFViA1 XRELGyk0dQAA X-Authentic-SMTP: 61633634383431.1023:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 81.98.252.242/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: [Caml-list] Vagaries of Printf variants Given: let f fmt = Printf.printf fmt;; [f] will have type ('a, out_channel, unit, unit) format4 Given: let f fmt = Printf.ksprintf print_string fmt [f] will have type ('a, unit, string, unit) format4 They do exactly the same thing (at least in terms of side effects) - what's the fundamental reason for having to suffer their having incompatible format types? It becomes excessively irritating when trying to switch between different formatters (as a given format string cannot be used in a way in which it appears to have more than one type, obviously), but I'm sure there's a reason for its being that way! David