comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: fyi, very interesting Ada paper OOP vs. Readability
Date: Mon, 21 May 2012 20:53:07 +0200
Date: 2012-05-21T20:53:07+02:00	[thread overview]
Message-ID: <vc1abqugagog.1bra8ltna4p2k$.dlg@40tude.net> (raw)
In-Reply-To: jpdtmc$2j6$1@speranza.aioe.org

On Mon, 21 May 2012 17:23:24 +0000 (UTC), NatarovVI wrote:

>> ADT was.
> 
> in russian - яПНяПНяПНяПНяПНяПНяПНяПНяПНяПН яПНяПНяПНяПНяПНяПН

In Russian it is: яПНяПНяПНяПНяПНяПНяПНяПНяПНяПНяПН яПНяПНяПН яПНяПНяПНяПНяПНяПН, which is a loan translation of
the original English term: Abstract Data Type.

>> A poor abstraction also, because it fails to capture any types
>> relations, beyond trivial containment.
> 
> do you really need other relations?

Sure. The relationships should:

1. reflect relevant relationships of the entities from domain space which
values of these types model.

2. serve purpose of software design per types decomposition, e.g. reuse,
readability, maintainability etc.

> type is builded from set's.

Certainly not. Which type is {-3, 'a', Pi, Employee}? A type cannot be
inferred from its values domain set. It need not to be. This is what gives
so much power to this abstraction. You can model galaxies on a PC because
of that.

>> How?
> 
> directly. parent, changing youself, can do any changes on child
> functions.

No. In a strongly typed language there is no way to have this scenario. It
is a type error.

> child incapsulation broken, because it contains parts defined
> elsewhere.

This is called modular design. In any case it is fully applied to
containment/aggregation. When you put an integer into a record, that brings
with it integer arithmetic defined elsewhere. I find it good.

Note also there is no way to override operations inherited for integer
components, because their type is sealed. On the contrary, inheritance
allows some operations re-implemented.

>> Containment breaks information hiding principle, separation of interface
>> and implementation, incapable to express referential semantics, enforces
>> tree-like structure of objects, break proper abstraction of semantically
>> integral types ... should I continue?
> 
> nope, all remains isolated in "subcontainer". and if we change it,
> "subcontainer" module interface changes and clients see it.

As I said, it defeats the information hiding principle. A leaking
abstraction is a poor one.

> what bad in tree-like?

Not everything is a tree..

>> How reading can be context free?
> 
> here is difference i talked about. when you read non-polymorphic prog,
> you have "one static context" - language definition.

1. You forgot ad-hoc polymorphism and statically parametric one, which are
still there without any inheritance. The operation "." (record member
extraction) is heavily overloaded, that is ad-hoc polymorphism.

2. There are visibility scopes bringing declarations of types, objects,
subprogram. The thing you envision exists only in Assembler, probably not
even there.

>> Type are not forms of program.
> 
> types represents categories of expressions.

Egh, which category of what expression Boolean is?

Type is a set of values bound by operations defined in terms these values
and values of other types.

>> Data does not exist without types, moreover they do not exist without
>> the agents interested in these data. In a larger context there are only
>> values, sets of values, types (sets of values bound by operations 
>> defined).
> 
> not exactly. data exist independently. then we attach types to it and can 
> do operations (of type). one data can have more than one type.

This is a model of weak typing. "Weak" is another word for inconsistent.
One reason why this is inconsistent is because you don't know the type of
the data. It could be any. That blows any formalism up. The concept of
typing appeared in mathematics in order to avoid antinomies.

>> Data is a definite state of some input to some program. That state is
>> described in terms of values of defined types from the problem domain.
>> So 2 could be data for the left argument of integer +, or an ASCII
>> character STX, or standard output descriptor, or whatever.
> 
> yep. data exist independently, and we attach types to it at any time.
> and make propositions and state invariants from that moment.

No, that is no data. Data is a definite state which means something for the
agent consuming them. Without a type, there is no meaning and no data.

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



  reply	other threads:[~2012-05-21 18:54 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 13:06 fyi, very interesting Ada paper OOP vs. Readability Nasser M. Abbasi
2012-05-09 13:19 ` Nasser M. Abbasi
2012-05-09 13:36   ` Dmitry A. Kazakov
2012-05-09 13:39     ` Patrick
2012-05-09 13:55       ` Egil Høvik
2012-05-10  2:33 ` Randy Brukardt
2012-05-10  6:33   ` Simon Wright
2012-05-12  0:37     ` Randy Brukardt
2012-05-30  2:09       ` BrianG
2012-05-30  7:29         ` Niklas Holsti
2012-05-30  7:54           ` Yannick Duchêne (Hibou57)
2012-05-30  7:59             ` Dmitry A. Kazakov
2012-05-30 12:45               ` stefan-lucks
2012-05-30 13:12                 ` Dmitry A. Kazakov
2012-05-30 19:11           ` Jeffrey Carter
2012-05-30 23:00           ` BrianG
2012-06-21 16:06             ` Randy Brukardt
2012-05-10  8:43   ` Maciej Sobczak
2012-05-15  6:16     ` Simon Wright
2012-05-10 11:46   ` Dmitry A. Kazakov
2012-05-10 14:23     ` Georg Bauhaus
2012-05-10 14:47       ` Nasser M. Abbasi
2012-05-10 15:11         ` Adam Beneschan
2012-05-10 16:06         ` Georg Bauhaus
2012-05-10 18:41           ` Niklas Holsti
2012-05-11  8:20             ` Georg Bauhaus
2012-05-10 20:11           ` Nasser M. Abbasi
2012-05-10 21:17             ` tmoran
2012-05-10 18:07         ` Jeffrey Carter
2012-05-11  7:32         ` Maciej Sobczak
2012-05-10 12:31 ` J-P. Rosen
2012-05-10 13:32 ` Yannick Duchêne (Hibou57)
2012-05-10 13:38   ` Nasser M. Abbasi
2012-05-10 23:42     ` Zhu Qun-Ying
2012-05-11  6:05   ` J-P. Rosen
2012-05-11  3:01 ` NatarovVI
2012-05-11  7:14   ` Dmitry A. Kazakov
2012-05-11  7:32     ` Nasser M. Abbasi
2012-05-11  7:58       ` Dmitry A. Kazakov
2012-05-13  3:11         ` NatarovVI
2012-05-13 10:03           ` Georg Bauhaus
2012-05-16 15:00             ` NatarovVI
2012-05-16 18:01               ` Georg Bauhaus
2012-05-21 16:35                 ` NatarovVI
2012-05-21 17:56                   ` Georg Bauhaus
2012-05-23 16:01                     ` NatarovVI
2012-05-23 16:12                       ` NatarovVI
2012-05-16 15:31     ` NatarovVI
2012-05-16 16:40       ` Dmitry A. Kazakov
2012-05-21 17:23         ` NatarovVI
2012-05-21 18:53           ` Dmitry A. Kazakov [this message]
2012-05-21 19:21             ` Nasser M. Abbasi
2012-05-23 17:59               ` NatarovVI
2012-05-23 18:45                 ` Dmitry A. Kazakov
2012-05-23 17:39             ` NatarovVI
2012-05-23 18:39               ` Dmitry A. Kazakov
2012-05-11  3:09 ` NatarovVI
replies disabled

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