caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Blair Zajac <blair@orcaware.com>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: sebastien FURIC <sebastien.furic@tni-valiosys.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Hashtbl.hash and Hashtbl.hash_param
Date: Tue, 27 Aug 2002 09:12:36 -0700	[thread overview]
Message-ID: <3D6BA4F4.C6A0E55F@orcaware.com> (raw)
In-Reply-To: <20020827102435.A17823@pauillac.inria.fr>

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 <blair@orcaware.com>
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


      parent reply	other threads:[~2002-08-27 16:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-23 15:24 sebastien FURIC
2002-08-23 15:45 ` sebastien FURIC
2002-08-23 16:27   ` Florian Douetteau
2002-08-27  8:24 ` Xavier Leroy
2002-08-27  9:59   ` jeanmarc.eber
2002-08-27 10:58     ` Alain Frisch
2002-08-27 16:12   ` Blair Zajac [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D6BA4F4.C6A0E55F@orcaware.com \
    --to=blair@orcaware.com \
    --cc=caml-list@inria.fr \
    --cc=sebastien.furic@tni-valiosys.com \
    --cc=xavier.leroy@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).