From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 99B23BB81 for ; Fri, 24 Feb 2006 12:22:13 +0100 (CET) Received: from grassmarket.ucs.ed.ac.uk (grassmarket.ucs.ed.ac.uk [129.215.166.64]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1OBMDnC031265 for ; Fri, 24 Feb 2006 12:22:13 +0100 Received: from smtp.sms.ed.ac.uk (nougat.ucs.ed.ac.uk [192.168.30.2]) by grassmarket.ucs.ed.ac.uk (8.12.10/8.12.10) with ESMTP id k1OBM93S018203 for ; Fri, 24 Feb 2006 11:22:09 GMT Received: from 80-192-1-11.cable.ubr03.edin.blueyonder.co.uk (80-192-1-11.cable.ubr03.edin.blueyonder.co.uk [80.192.1.11]) by www.sms.ed.ac.uk (Horde MIME library) with HTTP; Fri, 24 Feb 2006 11:22:09 +0000 Message-ID: <20060224112209.51szurk2dc00oggg@www.sms.ed.ac.uk> Date: Fri, 24 Feb 2006 11:22:09 +0000 From: EEK Cooper To: caml-list@yquem.inria.fr Subject: Map.fold behavior changed MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.4) X-Edinburgh-Scanned: at grassmarket.ucs.ed.ac.uk with MIMEDefang 2.33, Sophie, Sophos Anti-Virus X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Miltered: at nez-perce with ID 43FEEC65.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 bug:01 camlcvs:01 cvsweb:01 stdlib:01 camlcvs:01 cvsweb:01 stdlib:01 compilation:01 cpp:01 ifdef:01 highlighted:98 compile:01 incompatible:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=FROM_ENDS_IN_NUMS autolearn=disabled version=3.0.3 Hi all, My team just noticed that the behavior of Map.fold changed in OCaml version 3.08.4. I'm concerned that the OCaml team would change the behavior of a library function so late in its life. I understand that it was thought to be "wrong" , but changing the behavior of an existing function breaks existing apps and shouldn't be done lightly. Such changes should, of course, be carefully highlighted in a change log as *incompatible* changes, requring updates to existing programs--this one was buried under "bug fixes." The old behavior was apparently longstanding since 1995 versus . If OCaml is meant to be a practical programming language, it should provide consistency for its users from version to version. That said, we're now in the position where we need to compile different code depending on the version of OCaml. What's the best way to do conditional compilation in OCaml? Should we use cpp and #ifdef, or is there a more OCaml-savvy solution? Thanks in advance, Ezra