comp.lang.ada
 help / color / mirror / Atom feed
From: christoph.grein@eurocopter.com
Subject: Re: Ada OOP syntax
Date: Wed, 18 Jun 2008 02:58:20 -0700 (PDT)
Date: 2008-06-18T02:58:20-07:00	[thread overview]
Message-ID: <5f0b81a1-cd8e-4853-9ba4-abd0d28bcd82@l42g2000hsc.googlegroups.com> (raw)
In-Reply-To: 2fde321e-7906-4050-a8c1-26069a8d0d65@j33g2000pri.googlegroups.com

> Especially, package types and package subtypes are very interesting.
> That syntax seems to be clearer than tagged types. I don't understand
> why it was rejected?- Zitierten Text ausblenden -

I think because this idea would have turned Ada inside out. In Ada (as
it is), packages are just some sort of containers defining a name
space (and of course some semantic relations between types and
operations defined inside).

A package type would have been what a record is now. There would be
two different syntaxes for the same semantic thing.

Also the word subtype as used in "package subtype" has a fundamentally
different meaning. In Ada (as it is), a subtype does not introduce a
new type with perhaps some added primitive operations, it only adds a
constraint. A package subtype would have been what a derived tagged
type is now.
A derived type is not compatible with its parent type (as would imply
the word subtype in those ideas) - they are convertible only.

You might argue that those ideas whould have been more in line with
other OO languages, especially the call syntax Obj.Method (which is
now available for Ada 2005), but I think Tucker's Ada 95 is a
congenial extension of Ichbiah's Ada 83 without assaulting the sytax
and sematics.

But YMMV.



  reply	other threads:[~2008-06-18  9:58 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
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 [this message]
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