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 TAA12468; Mon, 25 Aug 2003 19:32:20 +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 TAA00455 for ; Mon, 25 Aug 2003 19:32:19 +0200 (MET DST) Received: from null.cs.brown.edu (null.cs.brown.edu [128.148.38.190]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h7PHWIT20704 for ; Mon, 25 Aug 2003 19:32:18 +0200 (MET DST) Received: from miette (miette [128.148.38.66]) by null.cs.brown.edu (Postfix) with ESMTP id DF7343F06; Mon, 25 Aug 2003 13:32:17 -0400 (EDT) Received: from er by miette with local (Exim 3.36 #1 (Debian)) id 19rLCT-0006JP-00; Mon, 25 Aug 2003 13:32:17 -0400 Date: Mon, 25 Aug 2003 13:32:17 -0400 From: Manos Renieris To: KONTRA Gergely Cc: caml-list@inria.fr Subject: Re: [Caml-list] hash objectified Message-ID: <20030825173217.GA24098@cs.brown.edu> Reply-To: Manos Renieris Mail-Followup-To: KONTRA Gergely , caml-list@inria.fr References: <20030821165832.GA5890@force.stwing.upenn.edu> <20030825154639.GC2900@mlabdial.hit.bme.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030825154639.GC2900@mlabdial.hit.bme.hu> User-Agent: Mutt/1.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; renieris:01 caml-list:01 hash:01 kontra:01 gergely:01 hashtbl:01 foo:01 foo:01 shorter:01 hashtbl:01 shorter:01 statically:01 compiler:01 0200,:01 lazy:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Aug 25, 2003 at 05:46:39PM +0200, KONTRA Gergely wrote: > > 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. -- Manos ------------------- 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