Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Re: [Ocaml-lib-devel] pMap.ml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: brogoff@s...
Subject: Re: [Caml-list] Re: [Ocaml-lib-devel] pMap.ml
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