Re: Definable operators

Henry Spencer <henry@zoo.toronto.edu>
22 Mar 1997 23:33:52 -0500

          From comp.compilers

Related articles
Problems with Hardware, Languages, and Compilers hrubin@stat.purdue.edu (1997-03-07)
Re: Definable operators (was: Problems with Hardware, Languages, and C andy@cs.Stanford.EDU (1997-03-16)
Re: Definable operators Dik.Winter@cwi.nl (1997-03-18)
Re: Definable operators fjh@murlibobo.cs.mu.OZ.AU (1997-03-18)
Re: Definable operators nmm1@cus.cam.ac.uk (1997-03-21)
Re: Definable operators henry@zoo.toronto.edu (Henry Spencer) (1997-03-22)
Re: Definable operators nmm1@cus.cam.ac.uk (1997-03-23)
Re: Definable operators fanf@lspace.org (Tony Finch) (1997-03-23)
Re: Definable operators Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-03-27)
Re: Definable operators henry@zoo.toronto.edu (Henry Spencer) (1997-03-31)
Re: Definable operators sethml@ugcs.caltech.edu (1997-03-31)
Re: Definable operators rivetchuck@aol.com (1997-04-02)
[33 later articles]
| List of all articles for this month |

From: Henry Spencer <henry@zoo.toronto.edu>
Newsgroups: comp.compilers,comp.lang.misc
Date: 22 Mar 1997 23:33:52 -0500
Organization: SP Systems, Toronto
References: 97-03-037 97-03-076 97-03-112 97-03-115
Keywords: design

Nick Maclaren <nmm1@cus.cam.ac.uk> wrote:
>The key is to add operator definitions in a limited, well-defined and
>clean fashion.
>
>>>Frankly, I see no "large" potential benefits.
>...
>It also makes certain programs (such as many numerical ones) a couple of
>orders of magnitude easier to follow...


I heard an interesting rule of thumb recently -- although my leaky
memory is now refusing to tell me who said it -- to the effect that
operator overloading works very well so long as the data objects are
*numbers* of some sort, or very close analogs of numbers, and very
poorly otherwise. I think there's a lot of truth in that.


--
| Henry Spencer
| henry@zoo.toronto.edu
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.