comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada OOP syntax
Date: Sat, 14 Jun 2008 17:31:55 +0200
Date: 2008-06-14T17:31:57+02:00	[thread overview]
Message-ID: <1tllou1y5txt2.1j3hh95i6b830.dlg@40tude.net> (raw)
In-Reply-To: _9adnb1KYvIrW87VnZ2dnUVZ_vOdnZ2d@comcast.com

On Sat, 14 Jun 2008 06:26:03 -0700, Steve wrote:

> Tagged type definitions, IMO are an abomination.  If you look at Delphi (an 
> object oriented version of Pascal), or C++, C# or Java, there is no 
> ambiguity of the scope of the entities that belong to an object.

Method is not an "entity" of an object. Note that the notation you are
advocating for is plainly inconsistent. Observe that the relation between a
method and *one* of the types of its arguments is just not 1-1.

The most notorious example when it becomes essential is multiple
dispatching operations. Operation Draw does not belong either to Device or
to Glyph.

1-1 mapping is inconsistent with operations having more than one argument
(including result). Thus any of the languages you have mention are not
OOPLs, as they necessary have types not obeying OO.

[...]
> Don't try to respond by explaining how to deal with tagged type definitions 
> in Ada.

Well, then let me explain you how to deal with OO! (:-))

> Perhaps the language could be enhanced to permit an alternate syntax that 
> clearly defines the scope of a class (or tagged type if anyone is stuck on a 
> name) and a pragma to only permit the alternate syntax added?

It should do exactly the reverse. Ada made such mistakes before, see
protected and task types. One consequence of these mistakes is that the
*private* part of a publicly visible protected type appears in a *public*
part of the package! This should be reversed in order treat all types
equally in OO way.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2008-06-14 15:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-14 13:26 Ada OOP syntax Steve
2008-06-14 15:31 ` Dmitry A. Kazakov [this message]
2008-06-14 18:16 ` Oliver Kellogg
2008-06-18  2:14   ` Steve
2008-06-18  7:48     ` markus034
2008-06-18  9:58       ` christoph.grein
2008-06-18 12:30       ` Dmitry A. Kazakov
2008-06-14 19:24 ` Jeffrey R. Carter
2008-06-14 21:22 ` anon
2008-06-15 14:32   ` Dirk Heinrichs
2008-06-16  4:59     ` anon
2008-06-16  6:33       ` Dirk Heinrichs
2008-06-17 20:26         ` anon
replies disabled

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