comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: on Ada abtract data type vs. OOP.
Date: Fri, 9 Sep 2022 17:21:43 +0200	[thread overview]
Message-ID: <tfflm6$1mmf$1@gioia.aioe.org> (raw)
In-Reply-To: tffj43$bt9$1@gioia.aioe.org

On 2022-09-09 16:37, antispam@math.uni.wroc.pl wrote:

> Your statement is _very_ misleading.  OO has many common aspects
> with ADT, but there is substantial difference.

I didn't say ADT is OO. I said OO is ADT. Clearly OO deals with abstract 
data types [and classes of].

[ Here abstract means: user-defined, an problem space abstraction, 
rather than Ada's abstract type in the meaning: a type with no instances. ]

> In more formal terms OO is mainy about
> _dynamic_ subtyping.

(dynamic polymorphism, actually)

OO is about of having classes of types in a way that the closure of that 
class would be a proper type again. In Ada terms:

1. T, some tagged type
2. Class = all types derived from T and T itself
3. [Derivation] closure type = T'Class

Ad-hoc polymorphism (overloading) and parametric polymorphism (generics) 
produce classes with no type for the closure. E.g. you have no type for 
all instances of all types having

    procedure Put (File : File_Type; Value : <type>); -- ad-hoc class

[... parametric polymorphism example skipped ...]

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

  reply	other threads:[~2022-09-09 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09  9:32 on Ada abtract data type vs. OOP Nasser M. Abbasi
2022-09-09 10:49 ` Dmitry A. Kazakov
2022-09-09 14:37   ` antispam
2022-09-09 15:21     ` Dmitry A. Kazakov [this message]
2022-09-09 15:30   ` Dmitry A. Kazakov
2022-09-09 14:04 ` Jeffrey R.Carter
2022-09-09 15:06 ` antispam
2022-09-11  8:02   ` G.B.
replies disabled

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