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 QAA32644; Mon, 2 Apr 2001 16:30:31 +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 QAA32613 for ; Mon, 2 Apr 2001 16:30:27 +0200 (MET DST) Received: from indigo.recherche.enac.fr (indigo.recherche.enac.fr [195.220.158.66]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f32EURD14649 for ; Mon, 2 Apr 2001 16:30:27 +0200 (MET DST) Received: from rouge.recherche.enac.fr (mail@rouge.recherche.enac.fr [10.31.1.70] (may be forged)) by indigo.recherche.enac.fr (8.8.6 (PHNE_14041)/8.6.11) with ESMTP id QAA21066; Mon, 2 Apr 2001 16:30:21 +0200 (METDST) Received: from localhost ([127.0.0.1] helo=recherche.enac.fr ident=alliot) by rouge.recherche.enac.fr with esmtp (Exim 3.12 #1 (Debian)) id 14k5LY-0006qA-00; Mon, 02 Apr 2001 16:30:20 +0200 Message-ID: <3AC88CFB.D94C5299@recherche.enac.fr> Date: Mon, 02 Apr 2001 16:30:19 +0200 From: Jean-Marc Alliot X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.0 i686) X-Accept-Language: fr, en MIME-Version: 1.0 To: Fergus Henderson CC: caml-list@inria.fr Subject: Re: Overloading again (Was Re: [Caml-list] Interfacing C++ and Ocaml) References: <3AC834B4.559806D0@recherche.enac.fr> <20010402234808.A8780@murlibobo.cs.mu.OZ.AU> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Fergus Henderson wrote: > This example is a bogus example, since C++ doesn't allow that kind of > overloading. C++ requires that every overloaded operator have at least > one parameter whose type is a class, or a reference to a class, > an enumeration, or a reference to an enumeration (see e.g. 13.1.1.2 > in the C++ standard). In this case the argument has pointer type, > so it can't call an overloaded operator. > Right, it was back from a fragment of my memory. The example was slightly more complex, but took as much time to be debugged. > > My opinion with regard to overloading is that what is really > problematic about overloading in C++ is the *combination* of > overloading and implicit conversions. Yes (in C++ it is much more horrible because of implicit conversions) and no : it is also bad in language like Ada (yes not ADA, right again, sorry lady Lovelace). It is in fact forbidden to use overloading by many quality manuals, (and so is the USE directive for example). 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... :-) -- | Jean-Marc Alliot | | http://www.recherche.enac.fr/~alliot | | alliot@recherche.enac.fr | ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr