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 18:10:57 +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: pFv5JukiA5DRwd1gSNRC4g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit 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:21514 Date: 2014-08-07T18:10:57+02:00 List-Id: On Thu, 07 Aug 2014 15:34:26 +0200, J-P. Rosen wrote: > Le 07/08/2014 14:28, Dmitry A. Kazakov a écrit : >>> No doubt? I'm very happy that elementary types are kept separate from >>> > all the OO stuff, for example... >> Is it OO being able to write a class-wide numeric Sort, Put, Image, >> container? > I prefer generics for that kind of stuff. It keeps my types independent, > and it doesn't need any dispatching. Generics do not work for containers: you cannot have one of class-wide elements. And generics enforce overloading which is a bad idea as Ada.Text_IO has proven. >> Anyway, it would help to indicate reasons for this happiness. I see no gain >> in having types and not-quite types in the language. And there are lot of >> problems with not-quite types in Ada concerning safety, reuse, >> maintainability (Ada's key features, BTW). > > Because good ol' elementary types are much simpler to understand, and > more efficient to implement. Having classes of elementary types does not change anything. > Classification makes sense only if you have > heterogeneous data structures that manipulate various types belonging to > a same class. This is rarely the case for elementary types. It is in any math book. Fields, groups, rings, spaces are such classifications known for centuries. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de