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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: A bad counterintuitive behaviour of Ada about OO Date: Thu, 7 Aug 2014 10:50:52 +0200 Organization: cbb software GmbH Message-ID: References: <932kntuq5rrr.8sumwibqrufn.dlg@40tude.net> <1ohy7vnbntskq$.h139ov04mlxu$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: ot/DC7n2aCvt5pcTM4dZCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:21506 Date: 2014-08-07T10:50:52+02:00 List-Id: On Thu, 7 Aug 2014 00:41:08 -0700 (PDT), Maciej Sobczak wrote: >> Remember that OO features in practically all OOPL are broken. Ada is the >> only language I know which implements OO consistently in a properly typed >> way. > > No way. :-D With type/interface schizophrenia, lack of MI, controlled as a > base class, I didn't say "completely", I said "consistently". True, lack of MI and having first- and second-class types is a serious incompleteness. You can add lack of full MD to the list, missing delegation support, lack of abstract interfaces for record, array, access, task, protected types. > unsafe (!!!) handling of dispatch during > initialization/finalization Well, I don't consider Initialize/Finalize stuff as initialization/finalization. To me it is hack made to avoid serious dealing with the issue. Thus it is not an inconsistency but an incompleteness of the Ada initialization/finalization model. It would be possible to add necessary hooks and leave Initialize/Finalize as is. More serious is the garbage limited return stuff. That borders inconsistency and likely crosses the border. A lighter issue is the return statement which allows multiple initialization-finalization rounds on the "same" object. Yet another serious issue is renaming to a differently constrained subtype. That is plain inconsistent. > and no support for type covariance on return > type Ada is way more broken than other languages I am aware of. I don't understand this. The return type is covariant in Ada. > No trolling here - I really consider the above issues to be problems. OO > in Ada definitely looks like a patchwork, not a consistent language > feature. Yes, but again a patchwork may mean incompleteness or inconsistency (or both (:-)) To me the most important thing is making classes of types typed. T /= T'Class. Ada did it. The rest could be fixed, if there were a desire. Unfortunately, there is none. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de