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: backlog2.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!news.stack.nl!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: Fri, 8 Aug 2014 13:20:52 +0200 Organization: cbb software GmbH Message-ID: <1iyw6q7texwn3$.4mgcck9beqmt.dlg@40tude.net> References: <932kntuq5rrr.8sumwibqrufn.dlg@40tude.net> <1ohy7vnbntskq$.h139ov04mlxu$.dlg@40tude.net> <1lREv.450693$4n.74225@fx31.iad> <1oj0b4rwma99b$.1iqu11p0ea556$.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="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: number.nntp.dca.giganews.com comp.lang.ada:188247 Date: 2014-08-08T13:20:52+02:00 List-Id: On Fri, 08 Aug 2014 05:10:25 -0600, Shark8 wrote: > On 08-Aug-14 02:26, Dmitry A. Kazakov wrote: >> The idea that subtyping can be directly reflect substitutability is the >> root problem and the idea that the set of values could somehow define the >> type so generalization or specialization might mean something. Ada's >> subtypes suffer this as well. Both are wrong. > > I don't understand this; subtypes are perfectly fine: essentially they > are subsets over the set of values that a type may take. And they break in-operations. As an example consider: X : Integer := -1; Now substitute Positive for Integer. Subsetting means nothing to subtyping and both very little to substitutability. All three are different things. > -- Is this to say they are a magic bullet? Nope. Huh, great mathematical problems are about fighting constraints. E.g. solving x**n + y**n = z**n in real numbers vs. in natural ones. No big deal? Same applies to programming, it is mostly about working around constraints. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de