From: donh@syd.csa.com.au (Don Harrison)
Subject: Re: Eiffel and Java + Ada dispatching
Date: 1996/10/30
Date: 1996-10-30T00:00:00+00:00 [thread overview]
Message-ID: <E02Lu2.In3@syd.csa.com.au> (raw)
In-Reply-To: 5563vp$1of@buggy.news.easynet.net
Vincent WEBER writes:
:In article <E00t53.CG2@syd.csa.com.au>, donh@syd.csa.com.au says...
:
:>
:>Don't mistake Ada's symmetrical syntax for multiple dispatching (binding
:>driven by more than one parameter). Ada is still single dispatched so for
:>dispatching operations, the symmetry is syntactic rather than semantic.
:>
:
:Hum... I'm lost, two ada specialists saying two different things :)
Sorry, I don't qualify as an Ada specialist (and comp.lang.ada will back me
up here). :) However, ...
:Let me cote
:an article from the french magazine "L'Objet" (Vol 1, no 1, Spring 95), by
:Antoine Bertier (Tomson Software Products) and Pascal Plisson (Alsys). I tried
:to translate from french to english, please apologize the mistakes if any :)
Don't know how the French was, but the English is pretty good. :)
:"It is important to note than tags of all the parameters have to be identical
:at run-time to have the dispatching done to only one effective operation.
Notice he's (you're) saying "only one effective effective operation"
(single dispatching). What I didn't mention is that in Ada, control over
dispatching can be *shared* by multiple parameters, but for a call to be valid
the actual dispatching parameters must have the same type ensuring that
binding to a unique procedure occurs. In the example below, type TILABLE_WINDOW
is presumably tagged so both parameters A and B jointly control dispatching.
However, MAIN_WINDOW and MESSAGE_WINDOW must have the same type; otherwise, an exception is raised).
It almost appears that having B as a dispatching parameter is redundant
but it conveys the extra information that it must have the same type as A.
:Therefore there is no priviliged parameter for dispatching as it is the case in
:other languages. This is an important advantage of Ada 95 's model compared to
:other languages such as C++, that break the natural symetry of some operations
:in privileging the parameter used for the dispatching ( et need a way to
:reference this parameter : "this" in C++). For instance :
:
: type TILABLE_WINDOW is new WINDOW;
: TILE(A,B : TILABLE_WINDOW);
: -- display the two window one under the other
: -- in covering all the screen
: MAIN_WINDOW, MESSAGE_WINDOW : TILABLE_WINDOW;
: TILE(MAIN_WINDOW, MESSAGE_WINDOW);
: -- the call is perfectly symetric. the parameters can be swapped
: -- in C++ we would have had a dissymetric call like:
: -- MAIN_WINDOW.TILE(MESSAGE_WINDOW);
:
: " (end of quotation).
A symmetrical solution in Eiffel which also conveys the fact that the windows
must have the same type might be:
class TILABLE_WINDOW is ...
class TILABLE_WINDOW_OPS is
...
tile (a, b: TILABLE_WINDOW) is
require same_type (a, b)
do ... end
...
end
and somewhere:
main_window, message_window : TILABLE_WINDOW
window_ops: TILABLE_WINDOW_OPS
...
window_ops.tile (main_window, message_window)
We've had to invent another class to get symmetry. Oh, well at least it's
obvious we are using single-dispatching.
Don.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Don Harrison donh@syd.csa.com.au
next prev parent reply other threads:[~1996-10-30 0:00 UTC|newest]
Thread overview: 162+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-27 0:00 Eiffel and Java Vincent WEBER
1996-10-27 0:00 ` Jean-Michel P. Decombe
1996-10-28 0:00 ` David Hanley
1996-10-28 0:00 ` Matt Kennel
1996-10-28 0:00 ` Alexandre Oliva
1996-10-28 0:00 ` Robert Dewar
1996-10-31 0:00 ` Doug Marker
1996-10-29 0:00 ` Chris Trimble
1996-10-31 0:00 ` Doug Marker
1996-10-31 0:00 ` David Bennett
1996-10-28 0:00 ` Matthew Heaney
1996-10-29 0:00 ` Vincent WEBER
1996-10-31 0:00 ` James McKim
1996-11-01 0:00 ` Matthew Heaney
1996-11-04 0:00 ` James McKim
1996-10-30 0:00 ` Jon S Anthony
1996-11-01 0:00 ` Eiffel and Java + Ada dispatching Jean-Marc Jezequel
1996-10-30 0:00 ` Eiffel and Java Don Harrison
1996-10-31 0:00 ` James McKim
1996-11-04 0:00 ` Don Harrison
1996-11-23 0:00 ` Van Snyder
1996-10-31 0:00 ` Joachim Durchholz
1996-11-01 0:00 ` Norman H. Cohen
1996-11-02 0:00 ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-02 0:00 ` Eiffel and Java Jon S Anthony
1996-11-03 0:00 ` Joachim Durchholz
1996-11-05 0:00 ` Norman H. Cohen
1996-10-28 0:00 ` Larry Kilgallen
1996-10-30 0:00 ` Ronald Cole
1996-10-29 0:00 ` Don Harrison
1996-10-29 0:00 ` Fergus Henderson
1996-10-30 0:00 ` Don Harrison
1996-10-30 0:00 ` Fergus Henderson
1996-10-31 0:00 ` David L. Shang
1996-11-01 0:00 ` Matt Kennel
1996-11-04 0:00 ` David L. Shang
1996-11-05 0:00 ` Matt Kennel
1996-11-06 0:00 ` David L. Shang
1996-11-04 0:00 ` Robert I. Eachus
1996-11-01 0:00 ` Jon S Anthony
1996-11-02 0:00 ` Fergus Henderson
1996-11-04 0:00 ` David L. Shang
1996-11-05 0:00 ` Jon S Anthony
1996-11-02 0:00 ` Darko BUDOR
1996-11-02 0:00 ` Fergus Henderson
1996-11-03 0:00 ` Matt Kennel
1996-11-03 0:00 ` Darko BUDOR
1996-11-03 0:00 ` Jon S Anthony
1996-11-03 0:00 ` Matthias Ernst
1996-11-05 0:00 ` Jon S Anthony
1996-11-10 0:00 ` Marcos F. F. de Macedo
1996-11-11 0:00 ` David L. Shang
1996-11-12 0:00 ` Fergus Henderson
1996-11-12 0:00 ` David L. Shang
1996-11-12 0:00 ` David L. Shang
1996-11-16 0:00 ` Fergus Henderson
1996-11-18 0:00 ` David L. Shang
1996-11-18 0:00 ` Kai Quale
1996-11-18 0:00 ` David L. Shang
1996-11-25 0:00 ` Kai Quale
1996-11-15 0:00 ` Paul Johnson
1996-11-12 0:00 ` Alexander Asteroth
1996-11-11 0:00 ` Marcos F. F. de Macedo
1996-11-12 0:00 ` Matt Kennel
1996-11-12 0:00 ` Benedict A. Gomes
1996-10-29 0:00 ` Eiffel and Java + Ada dispatching Vincent WEBER
1996-10-30 0:00 ` Jean-Marc Jezequel
1996-11-01 0:00 ` Joachim Durchholz
1996-11-01 0:00 ` Don Harrison
1996-10-30 0:00 ` Don Harrison [this message]
1996-10-30 0:00 ` Jon S Anthony
1996-10-30 0:00 ` Robert I. Eachus
1996-10-30 0:00 ` Eiffel and Java David Petrie Stoutamire
1996-10-30 0:00 ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-04 0:00 ` Don Harrison
1996-11-04 0:00 ` C to Ada Ali Mirhosseini
1996-11-04 0:00 ` Matthew Daniel
1996-11-04 0:00 ` Robert Dewar
1996-11-05 0:00 ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-05 0:00 ` Don Harrison
1996-11-06 0:00 ` Jon S Anthony
1996-10-31 0:00 ` Jon S Anthony
1996-11-01 0:00 ` Jean-Marc Jezequel
[not found] ` <E06F2B.Az7@syd.csa.com.au>
1996-11-01 0:00 ` Jon S Anthony
1996-11-04 0:00 ` Don Harrison
1996-11-05 0:00 ` Jon S Anthony
1996-11-02 0:00 ` Robert Dewar
1996-11-04 0:00 ` Norman H. Cohen
1996-11-05 0:00 ` Don Harrison
1996-11-05 0:00 ` Robb Nebbe
1996-11-06 0:00 ` Jean-Marc Jezequel
1996-11-07 0:00 ` Robb Nebbe
1996-11-06 0:00 ` To overload or not to overload (was Eiffel and Java + Ada dispatching) Don Harrison
1996-11-06 0:00 ` Robb Nebbe
1996-11-07 0:00 ` Don Harrison
1996-11-07 0:00 ` Jon S Anthony
1996-11-07 0:00 ` Juergen Schlegelmilch
1996-11-08 0:00 ` Don Harrison
1996-11-08 0:00 ` Don Harrison
1996-11-14 0:00 ` Jon S Anthony
1996-11-14 0:00 ` Jon S Anthony
1996-11-07 0:00 ` Jon S Anthony
1996-11-11 0:00 ` Don Harrison
1996-11-08 0:00 ` bill.williams
1996-11-11 0:00 ` Don Harrison
1996-11-07 0:00 ` Norman H. Cohen
1996-11-08 0:00 ` Eiffel and Java + Ada dispatching Robert I. Eachus
1996-11-05 0:00 ` Joachim Durchholz
1996-11-06 0:00 ` Robert I. Eachus
1996-11-08 0:00 ` Don Harrison
1996-11-08 0:00 ` Jon S Anthony
1996-11-08 0:00 ` Robert A Duff
1996-11-12 0:00 ` Don Harrison
1996-11-12 0:00 ` Robert A Duff
1996-11-13 0:00 ` Don Harrison
1996-11-13 0:00 ` Jon S Anthony
1996-11-15 0:00 ` Don Harrison
1996-11-19 0:00 ` Jon S Anthony
1996-11-20 0:00 ` Don Harrison
1996-11-13 0:00 ` Robert A Duff
1996-11-14 0:00 ` Don Harrison
1996-11-12 0:00 ` Joachim Durchholz
1996-11-15 0:00 ` Richard Riehle
1996-11-16 0:00 ` Interfacing contracts (Was: Eiffel and Java + Ada dispatching) Geert Bosch
1996-11-17 0:00 ` Robert A Duff
1996-11-14 0:00 ` Eiffel and Java + Ada dispatching Robert I. Eachus
1996-11-14 0:00 ` Robert A Duff
1996-11-15 0:00 ` Don Harrison
1996-11-15 0:00 ` Robert I. Eachus
1996-11-19 0:00 ` Don Harrison
1996-11-18 0:00 ` Vincent Celier
1996-11-22 0:00 ` Don Harrison
1996-11-19 0:00 ` Jon S Anthony
1996-11-15 0:00 ` portmanteau (was Re: Eiffel and Java + Ada dispatching) Robert I. Eachus
1996-11-07 0:00 ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-07 0:00 ` Robb Nebbe
1996-11-12 0:00 ` Jon S Anthony
1996-10-31 0:00 ` Joachim Durchholz
1996-11-01 0:00 ` Eiffel and Java Matthias Ernst
1996-11-01 0:00 ` William Clodius
1996-11-01 0:00 ` Benedict A. Gomes
1996-11-02 0:00 ` Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-02 0:00 ` Jon S Anthony
1996-11-04 0:00 ` Eiffel and Java Robert I. Eachus
1996-10-30 0:00 ` Jon S Anthony
1996-11-01 0:00 ` Don Harrison
1996-11-01 0:00 ` Jon S Anthony
1996-11-07 0:00 ` Marcos F. F. de Macedo
1996-11-11 0:00 ` Ian Joyner
1996-11-12 0:00 ` Don Harrison
1996-11-13 0:00 ` Norman H. Cohen
1996-11-15 0:00 ` Don Harrison
1996-11-14 0:00 ` Jon S Anthony
1996-11-15 0:00 ` Don Harrison
1996-11-19 0:00 ` Jon S Anthony
1996-11-21 0:00 ` Don Harrison
1996-11-12 0:00 ` Jon S Anthony
1996-10-31 0:00 ` Joachim Durchholz
1996-11-01 0:00 ` Jon S Anthony
1996-11-02 0:00 ` Jon S Anthony
1996-11-03 0:00 ` Eiffel and Java + Ada dispatching Joachim Durchholz
1996-11-04 0:00 ` Eiffel and Java Richard A. O'Keefe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox