From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b076e6315fd62dc5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.125.201 with SMTP id ms9mr6564990pbb.3.1337186461975; Wed, 16 May 2012 09:41:01 -0700 (PDT) Path: pr3ni5837pbb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: fyi, very interesting Ada paper OOP vs. Readability Date: Wed, 16 May 2012 18:40:56 +0200 Organization: cbb software GmbH Message-ID: <1qkmythqujvoa$.h4megbum9r4c$.dlg@40tude.net> References: <1ir29foizbqv1.v9uuhpykjl3n.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 4RFYTQ6jM/dAKFJoI0fUkg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-05-16T18:40:56+02:00 List-Id: On Wed, 16 May 2012 15:31:18 +0000 (UTC), NatarovVI wrote: >>> Only data abstraction and modularity (without inheritance and, maybe, >>> polymorphism) is good. >> >> What is abstracted then? >> >> P.S. There is no data without types. > > What do you try to say? > I try to say - there was "Data Abstraction" technology before OOP. ADT was. > it's like OOP but without inheritance and polymorphism. A poor abstraction also, because it fails to capture any types relations, beyond trivial containment. > Only incapsulation. And that was good. It wasn't good or bad. ADT predated richer algebras of types, as ad-hoc and parametric polymorphisms did. There were obvious weaknesses in the ways ADT worked in early languages. Some of them were overcame, some not until today. > inheritance break those good incapsulation. How? 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? > polymorphism makes program reading context-dependent, that can be bad > also. How reading can be context free? > P.S. types is just alternative form of program, written purposely for > checking programmist's errors. Type are not forms of program. > So. Data CAN be "without types". Only this will be unsafe. > 2+2=4. what type of 2 have? integer? enum? real? set of (2,4)? > until we write we not know. and just cannot check. Which is in self contradiction. If 2 is without a type why are you asking which type it has? 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). 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. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de