Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Interfacing C++ and Ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-04-02 (15:49)
From: Brian Rogoff <bpr@b...>
Subject: Re: Overloading again (Was Re: [Caml-list] Interfacing C++ and Ocaml)
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

> 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  Archives: