Browse thread
[Caml-list] Re: [Ocaml-lib-devel] pMap.ml
-
Richard Jones
- Stefano Zacchiroli
- Markus Mottl
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Stefano Zacchiroli <zack@b...> |
| Subject: | Re: [Caml-list] Re: [Ocaml-lib-devel] pMap.ml |
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