Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #375
| From | Kaz Kylheku <kaz@kylheku.com> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Looking for volunteers for XL |
| Date | 2011-12-01 05:44 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <11-12-003@comp.compilers> (permalink) |
| References | (2 earlier) <11-11-054@comp.compilers> <11-11-058@comp.compilers> <11-11-060@comp.compilers> <11-11-067@comp.compilers> <11-11-070@comp.compilers> |
On 2011-11-30, ardjussi <jussi.santti@ard.fi> wrote: > On 29 marras, 00:12, Christophe de Dinechin <christo...@taodyne.com> > wrote: >> >> > The other kind of extensibility I know about is operator overloading, >> > where the problems are well-known; the expression A+B could >> > conceivably mean anything, instead of being restricted to a small set >> > of predefined types. >> >> This argument was made a long time ago by Bertrand Meyer in a very >> articulate article, see >> http://se.ethz.ch/~meyer/publications/joop/overloading.pdf. >> >> While the article is very well written, I totally disagree with Meyer >> on this (even though I respect him a lot as a language designer). Why? >> Because I can't even think of using a programming language where I >> need to write "1 + 2" for integer addition, and something different >> like "1.3 +. 4.2" for floating-point addition. > > This is not the case with Eiffel. The addition operator for both > integer and floating is "+". This is not a case of operator > overloading in pure object oriented setting of Eiffel, since the > operator appears in two different classes: integer and floating. An > example of overloading would be "+" appearing twice with different > signatures in the integer class. Overloading is any situation in which a symbol has more than one meaning, resolved by context, such as the class of some argument. It is "loaded up" with two or more meanings, hence "overloaded". "Appearing in the class" is a very language-specific notion. In fact when we invoke some operation "on" an object: x.foo(y), obj is an argument to the function foo: this is just a syntactic sugar for foo(x, y). Except that in many Blub-type languages, x is given a special treatment: x's dynamic type gets taken into account to determine the call, but only the static type of y. Just because the dynamic type of x is used, and the static type of y does not mean that foo is overloaded only with respect to argument y. Let us not confuse "overloading" as it is used Eiffel or C++ with, well, computer science. Both the static and dynamic types supply context to resolve the meaning of the call foo.
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Looking for volunteers for XL Christophe de Dinechin <christophe@taodyne.com> - 2011-11-22 21:03 -0800
Re: Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-11-26 05:43 +0000
Re: Looking for volunteers for XL Christophe de Dinechin <christophe@taodyne.com> - 2011-11-26 12:38 -0800
Re: Looking for volunteers for XL "BartC" <bc@freeuk.com> - 2011-11-26 23:19 +0000
Re: Looking for volunteers for XL Christophe de Dinechin <christophe@taodyne.com> - 2011-11-27 12:34 -0800
Re: Looking for volunteers for XL "BartC" <bc@freeuk.com> - 2011-11-27 22:24 +0000
Re: Looking for volunteers for XL Christophe de Dinechin <christophe@taodyne.com> - 2011-11-28 14:12 -0800
Re: Looking for volunteers for XL ardjussi <jussi.santti@ard.fi> - 2011-11-30 13:16 -0800
Re: Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-01 05:44 +0000
Re: overloading, was Looking for volunteers for XL glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-12-02 05:36 +0000
Re: Looking for volunteers for XL tm <thomas.mertes@gmx.at> - 2012-01-03 09:28 -0800
Re: Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-11-28 04:45 +0000
Re: Looking for volunteers for XL Timothy Knox <tdk@thelbane.com> - 2011-11-27 22:50 -0800
Re: Looking for volunteers for XL Alex McDonald <blog@rivadpm.com> - 2011-12-01 12:11 -0800
Re: Looking for volunteers for XL "BartC" <bc@freeuk.com> - 2011-11-28 10:23 +0000
Re: Looking for volunteers for XL glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-11-29 07:37 +0000
Re: macros, Looking for volunteers for XL Gene Wirchenko <genew@ocis.net> - 2011-12-03 17:36 -0800
Re: macros, Looking for volunteers for XL glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-12-05 04:24 +0000
Re: Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-01 05:35 +0000
Re: designing language extensions, was Looking for volunteers for XL Marco van de Voort <marcov@toad.stack.nl> - 2011-12-03 13:02 +0000
Re: Looking for volunteers for XL jgk@panix.com (Joe keane) - 2011-12-13 00:08 +0000
Re: macros, was Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-13 01:39 +0000
Re: macros, was Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-14 19:00 +0000
Re: macros, was Looking for volunteers for XL jgk@panix.com (Joe keane) - 2011-12-15 15:40 +0000
Re: macros, was Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-16 17:48 +0000
Re: Looking for volunteers for XL glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-11-28 10:26 +0000
csiph-web