From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA04250 for caml-redistribution@pauillac.inria.fr; Wed, 19 Apr 2000 20:52:01 +0200 (MET DST) Resent-Message-Id: <200004191852.UAA04250@pauillac.inria.fr> 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 PAA25891 for ; Wed, 19 Apr 2000 15:46:30 +0200 (MET DST) Received: from mail5.svr.pol.co.uk (mail5.svr.pol.co.uk [195.92.193.20]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id PAA17488 for ; Wed, 19 Apr 2000 15:46:26 +0200 (MET DST) Received: from modem-54.claritin.dialup.pol.co.uk ([62.136.85.54] helo=toy.william.bogus) by mail5.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 12huoC-0008GT-00 for caml-list@inria.fr; Wed, 19 Apr 2000 14:46:25 +0100 Received: (from williamc@localhost) by toy.william.bogus (8.8.7/8.8.7) id OAA27001; Wed, 19 Apr 2000 14:45:06 +0100 Date: Wed, 19 Apr 2000 14:45:06 +0100 Message-Id: <200004191345.OAA27001@toy.william.bogus> From: William Chesters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "thierry BRAVIER" Cc: caml-list@inria.fr Subject: Re: Caml wish list In-Reply-To: <38FD9B38.6691E0D6@dassault-aviation.fr> References: <38E7F364.5D24BB7C@motorola.com> <14572.49274.910966.673172@cylinder.csl.sri.com> <38ED71B6.30118608@motorola.com> <14574.1721.508470.790475@cylinder.csl.sri.com> <38F270CF.221F5BD0@motorola.com> <20000411195808.62154@pauillac.inria.fr> <38F3D520.9CD19485@motorola.com> <14581.28385.615880.93928@pc89.lri.fr> <14581.55775.16448.947429@tkb.mpl.com> <38F6E5C8.972110C3@univ-savoie.fr> <38FD9B38.6691E0D6@dassault-aviation.fr> X-Mailer: VM 6.34 under Emacs 20.2.1 Resent-From: weis@pauillac.inria.fr Resent-Date: Wed, 19 Apr 2000 20:52:01 +0200 Resent-To: caml-redistribution@pauillac.inria.fr thierry BRAVIER writes: > > One could event think to reuse symbols like + for many functions. > > Here is a simple proposal on how to do it that I would really enjoy to > > see working : > > > > Two new commands in OCaml structure (the syntax can be changed): > > > > share + : 'a -> 'a -> 'a > > > > this makes that + exists and is type-checked with type 'a -> 'a -> 'a > > > > share + = add_int > > share + = add_float > > ... > > > > I fear that your share proposal will not interact well with separate compiling of > modules: > how can the list of all share definition be completely know to the compiler ? Well, I can't remember offhand how SMJ/NJ handles overloading, but it seems to work reasonably well. On the other hand, I am nowadays a convert to ocaml's hard line on overloading---it's an absolute curse of many, many C++ programs by coders whose enthusiasm outruns their judgement.