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 RAA02167; Mon, 2 Apr 2001 17:49:55 +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 RAA02221 for ; Mon, 2 Apr 2001 17:49:54 +0200 (MET DST) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f32FnrD16128 for ; Mon, 2 Apr 2001 17:49:53 +0200 (MET DST) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id IAA19146; Mon, 2 Apr 2001 08:49:41 -0700 (PDT) Date: Mon, 2 Apr 2001 08:49:41 -0700 (PDT) From: Brian Rogoff To: Jean-Marc Alliot cc: Fergus Henderson , caml-list@inria.fr Subject: Re: Overloading again (Was Re: [Caml-list] Interfacing C++ and Ocaml) In-Reply-To: <3AC88CFB.D94C5299@recherche.enac.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 2 Apr 2001, Jean-Marc Alliot wrote: > Fergus Henderson wrote: > > My opinion with regard to overloading is that what is really > > problematic about overloading in C++ is the *combination* of > > overloading and implicit conversions. I agree with Fergus on this. Clearly one can make a mess with overloading, but used with good taste it really makes programs better. I've always found it interesting that fans of type inference tell us how great it is not to be burdened with writing out explicit type information (which many programmers would consider helpful documentation) only to be left sticking it onto function names. Labels help us a bit here (thanks Jacques!) but a little bit of overloading really helps. In C++, well, .... I agree that the combination of implicit conversions and overloading is a disaster. > It is in fact forbidden to use overloading by many quality manuals, Well, Jean Ichbiah and his Green team put it in so I imagine they thought it could be used to write more maintainable code. Anyways, the AQS doesn't ban overloading but states the obvious Limit overloading to widely used subprograms that perform similar actions on arguments of different types (Nissen and Wallis 1984). and other obvious rules of thumb. > (and so is the USE directive for example). See "In Defense of the Use Clause" by Jean-Pierre Rosen at http://perso.wanadoo.fr/adalog/publica2.htm > I hated that quality manual in the beginning, I now > consider that it is not as terrible as I thought when I was > younger. From your mail, I would say you're younger than I am... :-) That's really not an appropriate way to argue, now is it? -- Brian ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr