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 OAA07624; Mon, 6 Oct 2003 14:06:41 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA14420 for ; Mon, 6 Oct 2003 14:06:40 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h96C6e119103 for ; Mon, 6 Oct 2003 14:06:40 +0200 (MET DST) Received: from fistandantilus.takhisis.org (dhcp150.dmi.ens.fr [129.199.97.150]) by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id h96C6djw010622 for ; Mon, 6 Oct 2003 14:06:39 +0200 (CEST) Received: by fistandantilus.takhisis.org (Postfix, from userid 3148) id D6FA527401F; Mon, 6 Oct 2003 14:06:39 +0200 (CEST) Date: Mon, 6 Oct 2003 14:06:39 +0200 From: Stefano Zacchiroli To: caml-list@inria.fr Subject: Re: [Caml-list] Re: [Ocaml-lib-devel] pMap.ml Message-ID: <20031006120639.GB14862@fistandantilus.takhisis.org> Mail-Followup-To: caml-list@inria.fr References: <20031005154938.GB31811@fichte.ai.univie.ac.at> <20031006083236.GA8512@redhat.com> <20031006090209.GA2594@fichte.ai.univie.ac.at> <008901c38bfd$aa08b530$6f01a8c0@PWARP> <20031006115403.GA13493@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031006115403.GA13493@redhat.com> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; bononia:01 caml-list:01 hash:01 foo:01 hash:01 foo:01 baz:01 prerr:01 endline:01 baz:01 camlcvs:01 hashtbl:01 prerr:01 endline:01 bononia:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Oct 06, 2003 at 12:54:03PM +0100, Richard Jones wrote: > Hashtbls are much easier to use than Maps precisely for the reasons he > has outlined. They'd be even better if the language offered syntactic > support for them (but this just reflects my Perl background), eg: > > let hash = {| "foo", "bar"; "a", "b" |} in > hash.{"foo"} <- "baz"; > prerr_endline hash.{"foo"}; # would print "baz" http://camlcvs.inria.fr/cgi-bin/osearch?conf=humps&words=hashtbl with a slight different syntax: let hash = {}["foo", "bar"; "a", "b"] in hash{"foo"} <- "baz"; prerr_endline (hash{"foo"}) Cheers. -- Stefano Zacchiroli -- Master in Computer Science @ Uni. Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} - http://www.bononia.it/zack/ " I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant! " -- G.Romney ------------------- 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