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 SAA03048; Tue, 7 Oct 2003 18:37:42 +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 SAA03306 for ; Tue, 7 Oct 2003 18:37:41 +0200 (MET DST) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h97Gbd128786 for ; Tue, 7 Oct 2003 18:37:40 +0200 (MET DST) Received: (qmail 32569 invoked from network); 7 Oct 2003 16:37:36 -0000 Received: from unknown (HELO grace.speakeasy.net) ([216.254.0.22]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 7 Oct 2003 16:37:36 -0000 Date: Tue, 7 Oct 2003 09:37:36 -0700 (PDT) From: brogoff@speakeasy.net To: "caml-list@inria.fr" Subject: Re: [Caml-list] Re: [Ocaml-lib-devel] pMap.ml In-Reply-To: <20031006120639.GB14862@fistandantilus.takhisis.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brogoff:01 caml-list:01 notations:01 hashtable:01 3.07:01 gcaml:01 hash:01 foo:01 hash:01 foo:01 baz:01 prerr:01 endline:01 baz:01 camlcvs:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk While it's nice to have stopgap solutions to these "problems", IMO the right solution will be possible when we have some kind of overloading in the language. Rather than having lots of squirrelly notations for hashtable access (and string access, and BigArray access, and...) we should just be able to index like arrays and be done with it. Lack of user defined overloading has always been a weak point in the entire ML family of languages, IMO. Hopefully, now that 3.07 is out, work on GCaml proceeds apace... -- Brian On Mon, 6 Oct 2003, Stefano Zacchiroli wrote: > 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 > ------------------- 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