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

On 2022-09-09 16:37, 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 ...]

Dmitry A. Kazakov

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

Thread overview: 10+ 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.
2024-04-19 16:25 ` Nioclás Pól Caileán de Ghloucester
2024-04-19 22:05   ` Lawrence D'Oliveiro
replies disabled

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