From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pB8IE1aC005214 for ; Thu, 8 Dec 2011 19:14:01 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiIBAKD94E5CbwQakGdsb2JhbAApGoUGpWMiAQEBAQkJDQcUBCGBcgEBBAEjHTgCBAsLGAICBRYLAgIJAwIBAgFFEwgBAReHbAgjpRxpkScHgTSGb4ICgRaIMpIIjHw X-IronPort-AV: E=Sophos;i="4.71,320,1320620400"; d="scan'208";a="134600581" Received: from out2.smtp.messagingengine.com ([66.111.4.26]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 08 Dec 2011 19:13:55 +0100 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id F28B321771 for ; Thu, 8 Dec 2011 13:13:52 -0500 (EST) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute3.internal (MEProxy); Thu, 08 Dec 2011 13:13:52 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=PPRd+17B6/BOPV/BGgoKjz t12OA=; b=pNe4Z/2H9wtcQni9ek9nol+XK8wpdUyXLoydU6PF4fNo9Wa44Gsj9Z AFTUrRdyq0u+40uwiFiG0ejNb5RIABfkn6aBMplZhFZ14sWYe4be4MNs5mRFX6Ei TCJqpI2iqKZL99p5rS74elo21xwkDTxpMNTui1iQysLHcuo2H/Pfw= X-Sasl-enc: GaKZD+rdgPFdNjrLSz03vH0H0fV4AfLNFv33WLAlopj9 1323368032 Received: from [192.168.1.206] (64-71-1-165.static.wiline.com [64.71.1.165]) by mail.messagingengine.com (Postfix) with ESMTPSA id A75258E01F2 for ; Thu, 8 Dec 2011 13:13:52 -0500 (EST) Message-ID: <4EE0FFDE.1050107@ens-lyon.org> Date: Thu, 08 Dec 2011 10:20:14 -0800 From: Martin Jambon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20101023 Lightning/1.0b3pre Thunderbird/3.1.3 MIME-Version: 1.0 To: caml-list@inria.fr References: <1323271707.32238.17.camel@arrakis> <4EDF9AAE.5050604@crans.org> <1323279292.32238.48.camel@arrakis> <4EE0A6C6.8040703@lri.fr> In-Reply-To: <4EE0A6C6.8040703@lri.fr> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Generic printer patch On 12/08/2011 04:00 AM, Romain Bardou wrote: >>> 2) Could you imagine to generalize it to Format.formatter or to >>> out_channel (without creating a string and concatenating)? Romain Bardou >>> add in the mantis tracker (I can't give you the bugtracking number since >>> mantis "is currently offline for maintenance") a feature wish for a new >>> conversion specification that can print anything. Do you think you can >>> fulfill is dream? > > Here is the feature request I proposed: > > http://caml.inria.fr/mantis/view.php?id=4956 > > Here is the response by Pierre Weis: > > "This is a major feature wish that requires careful thinking and a lot > of work! > > Furthermore, we would not have a completely satisfactory solution in the > end (due to this catch all case that tend to propagate, as far as > you use polymorphic functions). The correct solution to get this feature > in its full glory is a major modification of the type system along the > lines of G'Caml. The feature we want is exactly Jeremie's "hack" (his words). We need this feature for debugging and displaying data in log files. This kind of data is almost never polymorphic, so there is no practical issue here. Also we don't need a standardized output format. However we would often like to truncate the data to a reasonable size. I understand that this feature could be replaced in the future by a more complete solution, but we would be happy if it were provided as an "experimental extension" of OCaml. Martin > In short, a natural feature wish in a strongly typed polymorphic > language; we had it in mind for decades; unfortunately, we are not yet > ready to offer it, even in the rather limited extent you proposed." > > In other words: what you did is awesome but I'm not sure that it will be > added in the trunk :( > > Cheers, >