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 UAA11216; Mon, 25 Aug 2003 20:28:26 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA27426 for ; Mon, 25 Aug 2003 20:28:23 +0200 (MET DST) Received: from lcavsun1.epfl.ch (lcavsun1.epfl.ch [128.178.8.3]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7PISNf07886 for ; Mon, 25 Aug 2003 20:28:23 +0200 (MET DST) Received: from lcavpc3.epfl.ch (lcavpc3.epfl.ch [128.178.8.27]) by lcavsun1.epfl.ch (8.8.8+Sun/8.8.8) with ESMTP id UAA12914; Mon, 25 Aug 2003 20:13:17 +0200 (MET DST) Date: Mon, 25 Aug 2003 20:13:17 +0200 (CEST) From: henridf@lcavsun1.epfl.ch X-X-Sender: henridf@lcavpc3.epfl.ch Reply-To: Henri DF To: Manos Renieris cc: KONTRA Gergely , Subject: Re: [Caml-list] hash objectified In-Reply-To: <20030825173217.GA24098@cs.brown.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; henridf:01 lcavsun:01 caml-list:01 hash:01 hashtbl:01 foo:01 foo:01 shorter:01 hashtbl:01 shorter:01 statically:01 runtime:01 compiler:01 lazy:02 ruby:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > Hashtbl.add h "foo" "bar" <--> h#add "foo" "bar" > > > > Because it is shorter to type -> less errors, quicker programming > > OO can be cool. (see ruby) > > I'm not OO fan, but lazy :) > > If that's the reason, once you do > module H = Hashtbl > then > H.add h "foo" "bar" > is only two characters longer, and one shift shorter :-) > And the compiler ensures the exact type of h, and you know statically > what function you call -> less to keep in your head -> less errors, > quicker programming. > and quicker at runtime too i would assume. ------------------- 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