comp.lang.ada
 help / color / mirror / Atom feed
From: "Michael Young" <nobody@all.org>
Subject: Re: Printing Enum Variable Re: Linux World
Date: 1999/03/08
Date: 1999-03-08T00:00:00+00:00	[thread overview]
Message-ID: <7bvufh$eel$1@remarQ.com> (raw)
In-Reply-To: m33e3gzw5n.fsf@mheaney.ni.net

Matthew Heaney <matthew_heaney@acm.org> wrote in message
news:m33e3gzw5n.fsf@mheaney.ni.net...
> > C++/Java style aWindow.GetDC(), we see GetDC(aWindow).
>
> This isn't a very convincing argument, since the C++/Java version
> requires one more token than the Ada version.
>
> The advantage of the Ada syntax is that binary operations are
> symmetrical.  You don't want to have a distinguished receiver, because
> there isn't one -- there are two.  Indeed, there may be more.

Please explain the part about symmetry and two or more receivers. Do you
mean something like:
"Joe, meet Jane. Jane, meet Joe."
  versus
"Meet(Joe, Jane)"

There are advantages and disadvantages to both, depending on the use and
situation. I can think of one language that supports both notations
equally, and it's not Ada.

I might be missing a whole bunch, but none of this seems really
earth-shattering in terms of expressing a design.

> The other benefit of the Ada way is that the syntax for manipulation
of
> user-defined types is consistent.  You don't want to have Yet Another
> Notation just because the type happens to be tagged.
>
>   Push (Item, On => Stack);
>
> Is stack a tagged type or not?  I don't know -- but that's the point.

Yes, I see your point regarding notations, but what exactly does that
mean? aStack.Push(aNumber) seems quite clear. In the other language, the
meaning is also the same, regardless if the type is tagged or not, or
whether the operation is dispatched or statically bound. These details
are necessarily private to the receiver's implementation (from a human
reader's point of view, that is). Ada is not the only, or even the
first, language to respect this privacy.

Could you be alluding to: aNumber.PushOnto(aStack)?

One has to ask why Number needs to be aware of Stack at all. In terms of
reader-friendliness, symmetry in notation seems more a liability than an
asset when symmetry does not truly exist. In fact, few useful examples
come to mind for symmetry in object designs. A uses B, but B is
oblivious to A.

Michael.






  reply	other threads:[~1999-03-08  0:00 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-02  0:00 Linux World Richard D Riehle
1999-03-02  0:00 ` fraser
1999-03-02  0:00   ` Printing Enum Variable " David Starner
1999-03-03  0:00     ` Fraser Wilson
1999-03-03  0:00       ` David Starner
1999-03-04  0:00         ` Richard D Riehle
1999-03-04  0:00         ` robert_dewar
1999-03-04  0:00         ` Magnus Larsson
1999-03-03  0:00           ` Hans Marqvardsen
1999-03-04  0:00             ` Nick Roberts
1999-03-04  0:00             ` robert_dewar
1999-03-04  0:00               ` Hans Marqvardsen
1999-03-05  0:00                 ` Larry Kilgallen
1999-03-05  0:00                 ` dewar
1999-03-05  0:00                   ` David Botton
1999-03-05  0:00                     ` robert_dewar
1999-03-04  0:00               ` Hans Marqvardsen
1999-03-05  0:00                 ` dewar
1999-03-07  0:00                   ` Hans Marqvardsen
1999-03-03  0:00           ` Printing Enum Variable Re: Linux World (Correction) Hans Marqvardsen
1999-03-04  0:00         ` Printing Enum Variable Re: Linux World fraser
1999-03-05  0:00           ` Nick Roberts
1999-03-05  0:00             ` fraser
1999-03-04  0:00         ` Richard D Riehle
1999-03-03  0:00     ` Larry Kilgallen
1999-03-03  0:00       ` Nick Roberts
1999-03-03  0:00         ` David Starner
1999-03-03  0:00     ` fraser
1999-03-03  0:00       ` David Starner
1999-03-03  0:00         ` fraser
1999-03-03  0:00         ` Samuel T. Harris
1999-03-04  0:00         ` robert_dewar
1999-03-03  0:00           ` David Starner
1999-03-04  0:00             ` Samuel Mize
1999-03-04  0:00               ` Samuel Mize
1999-03-05  0:00                 ` Robert A Duff
1999-03-05  0:00               ` Robert A Duff
1999-03-07  0:00               ` Florian Weimer
1999-03-07  0:00                 ` Michael Young
1999-03-07  0:00                   ` Larry Kilgallen
1999-03-07  0:00                     ` Michael Young
1999-03-08  0:00                       ` Larry Kilgallen
1999-03-08  0:00                         ` robert_dewar
1999-03-08  0:00                       ` Florian Weimer
1999-03-08  0:00                       ` robert_dewar
1999-03-08  0:00                         ` Richard D Riehle
1999-03-09  0:00                           ` Michael Young
1999-03-09  0:00                             ` Larry Kilgallen
1999-03-09  0:00                               ` billy
1999-03-10  0:00                                 ` robert_dewar
1999-03-10  0:00                                   ` Dale Stanbrough
1999-03-10  0:00                                     ` dennison
1999-03-10  0:00                                       ` bob
1999-03-10  0:00                                         ` Mike Silva
1999-03-10  0:00                                           ` dennison
1999-03-10  0:00                                           ` Nick Roberts
1999-03-10  0:00                                     ` Richard D Riehle
1999-03-10  0:00                                     ` Pascal Obry
1999-03-10  0:00                                 ` Pascal Obry
1999-03-09  0:00                               ` Michael Young
1999-03-10  0:00                                 ` Mike Silva
     [not found]                               ` <7 <7c58qa$b6b$1@cf01.edf.fr>
1999-03-10  0:00                                 ` fraser
     [not found]                               ` <7c4ru6$e45$1@remarq.com>
1999-03-10  0:00                                 ` fraser
     [not found]                             ` <1999Mar9.131659. <dale-1003991644340001@r1021c-07.ppp.cs.rmit.edu.au>
1999-03-10  0:00                               ` Larry Kilgallen
1999-03-07  0:00                   ` Matthew Heaney
1999-03-08  0:00                     ` Michael Young [this message]
1999-03-08  0:00                       ` Matthew Heaney
1999-03-04  0:00             ` robert_dewar
1999-03-04  0:00           ` Ehud Lamm
1999-03-05  0:00             ` Richard D Riehle
1999-03-05  0:00               ` Nick Roberts
1999-03-06  0:00                 ` Ehud Lamm
1999-03-06  0:00                   ` robert_dewar
1999-03-06  0:00                     ` Larry Kilgallen
1999-03-06  0:00                       ` Dave Taylor
1999-03-06  0:00                         ` Bruce or Tracy
1999-03-06  0:00                     ` Ehud Lamm
1999-03-04  0:00         ` dennison
1999-03-04  0:00           ` Ehud Lamm
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox