caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@best.com>
To: Jean-Marc Alliot <alliot@recherche.enac.fr>
Cc: Fergus Henderson <fjh@cs.mu.OZ.AU>, caml-list@inria.fr
Subject: Re: Overloading again (Was Re: [Caml-list] Interfacing C++ and Ocaml)
Date: Mon, 2 Apr 2001 08:49:41 -0700 (PDT)	[thread overview]
Message-ID: <Pine.BSF.4.21.0104020824270.7294-100000@shell5.ba.best.com> (raw)
In-Reply-To: <3AC88CFB.D94C5299@recherche.enac.fr>

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


  reply	other threads:[~2001-04-02 15:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-30  8:54 [Caml-list] Interfacing C++ and Ocaml David Chemouil
2001-03-30  9:13 ` Bruce Hoult
2001-03-30  9:24   ` Fergus Henderson
2001-03-30 16:50 ` Overloading again (Was Re: [Caml-list] Interfacing C++ and Ocaml) Brian Rogoff
2001-04-02  8:13   ` Jean-Marc Alliot
2001-04-02 13:48     ` Fergus Henderson
2001-04-02 14:30       ` Jean-Marc Alliot
2001-04-02 15:49         ` Brian Rogoff [this message]
2001-04-09  6:47           ` John Max Skaller
2001-04-02 15:51     ` Brock
2001-03-30 20:41 Hao-yang Wang
2001-04-01 20:15 ` Sven LUTHER
2001-04-02 11:07   ` Sven LUTHER

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.BSF.4.21.0104020824270.7294-100000@shell5.ba.best.com \
    --to=bpr@best.com \
    --cc=alliot@recherche.enac.fr \
    --cc=caml-list@inria.fr \
    --cc=fjh@cs.mu.OZ.AU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).