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 MAA31060; Fri, 19 Jul 2002 12:37:27 +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 MAA31056 for ; Fri, 19 Jul 2002 12:37:26 +0200 (MET DST) Received: from dewberry.cc.columbia.edu (dewberry.cc.columbia.edu [128.59.59.68]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6JAbP106821 for ; Fri, 19 Jul 2002 12:37:25 +0200 (MET DST) Received: from there (tw304h3.cpmc.columbia.edu [156.111.84.180]) by dewberry.cc.columbia.edu (8.9.3/8.9.3) with SMTP id GAA11831; Fri, 19 Jul 2002 06:33:38 -0400 (EDT) Message-Id: <200207191033.GAA11831@dewberry.cc.columbia.edu> Content-Type: text/plain; charset="iso-8859-1" From: Oleg To: Andreas Rossberg Subject: Re: [Caml-list] productivity improvement Date: Fri, 19 Jul 2002 06:34:43 -0400 X-Mailer: KMail [version 1.3.2] Cc: caml-list References: <20020716172916.4903.qmail@web10702.mail.yahoo.com> <200207190821.EAA09974@hickory.cc.columbia.edu> <3D37D474.2551F19E@ps.uni-sb.de> In-Reply-To: <3D37D474.2551F19E@ps.uni-sb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Friday 19 July 2002 04:57 am, Andreas Rossberg wrote: > And how would you do more complex case analysis, corresponding to nested > patterns? I think I know what nested patterns are (something like Node (x, y, Bla(1, _)) -> ...), but I don't see where any extra difficulty will come from while using virtual functions. Could you give specific examples please? > This is more than cumbersome and error-prone in C++ - with > RTTI, and even more so with method dispatch, where your single algorithm > will have to be scattered over tons of distant functions. A maintenance > nightmare. Why would maintaining code organized by data type be harder? Isn't it what encapsulation is all about? > BTW, as Issac noted, you cannot even use switch statements to perform > RTTI in C++. You have to program if cascades. That is correct. I never actually had to use RTTI, so I thought typeid could be converted into int. Regards, Oleg ------------------- 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