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 SAA29940; Tue, 27 Aug 2002 18:12:41 +0200 (MET DST) 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 SAA29456 for ; Tue, 27 Aug 2002 18:12:40 +0200 (MET DST) Received: from orcaware.com (bdsl.66.12.233.174.gte.net [66.12.233.174]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g7RGCcv06611; Tue, 27 Aug 2002 18:12:38 +0200 (MET DST) Received: from orcaware.com (localhost.localdomain [127.0.0.1]) by orcaware.com (8.12.5/8.12.5) with ESMTP id g7RGCavk009816; Tue, 27 Aug 2002 09:12:36 -0700 Message-ID: <3D6BA4F4.C6A0E55F@orcaware.com> Date: Tue, 27 Aug 2002 09:12:36 -0700 From: Blair Zajac X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,x-ns1rfacHe4WNh5,x-ns2U100btwUq5f MIME-Version: 1.0 To: Xavier Leroy CC: sebastien FURIC , caml-list@inria.fr Subject: Re: [Caml-list] Hashtbl.hash and Hashtbl.hash_param References: <3D6653C0.F895EC59@tni.fr> <20020827102435.A17823@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier Leroy wrote: > > However, we need to think twice before changing the hashing function, > because this would cause trouble to users that store hashtables in > files using output_value/input_value: if the hash function changes > before writing and reading, the hashtable read becomes unusable. > > Hence, a request for OCaml users: if you use hashtables whose keys are > structured data (not just strings or integers), *and* your program > stores hashtables to files, *and* it's important for you that these > persistent hashtables can be read back with future versions of OCaml, > then please drop me a line. I agree with the sentiment that OCaml should not be held up by backwards compatibility. But I think adding a version header to the files that indicates the particular hashing function used would allow newer OCaml's to read older files. The newer OCaml's would only write the new version of the files. This would require that OCaml binary keep the old hash functions around, but this could be made a configure option to enable this feature. I'm reminded of Perl's Storable module which serves much the same function and had a method to read old Storable files but only write new versioned files. Best, Blair -- Blair Zajac Web and OS performance plots - http://www.orcaware.com/orca/ ------------------- 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