Related articles |
---|
Problems with Hardware, Languages, and Compilers hrubin@stat.purdue.edu (1997-03-07) |
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) |
Re: Definable operators Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-04-02) |
Re: Definable operators burley@gnu.ai.mit.edu (Craig Burley) (1997-04-03) |
[31 later articles] |
From: | Tony Finch <fanf@lspace.org> |
Newsgroups: | comp.compilers,comp.lang.misc |
Date: | 23 Mar 1997 23:24:46 -0500 |
Organization: | Coll: SS. et Indiv: Trin: Cant: |
References: | 97-03-037 97-03-112 97-03-115 97-03-141 |
Keywords: | syntax, design |
Henry Spencer <henry@zoo.toronto.edu> wrote:
>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.
There are a lot of applications of operator overloading in functional
programming that are not related to numbers. Monads are a class of
objects with certain algebraic properties that are used to control
order of execution. These common properties make it desirable to use
the same operators on IO monads and list monads and exception monads.
Overloading is also useful in combinator parsers.
Tony.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.