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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx01.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:30.0) Gecko/20100101 Thunderbird/30.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: A bad counterintuitive behaviour of Ada about OO References: <932kntuq5rrr.8sumwibqrufn.dlg@40tude.net> <1ohy7vnbntskq$.h139ov04mlxu$.dlg@40tude.net> <1lREv.450693$4n.74225@fx31.iad> <1oj0b4rwma99b$.1iqu11p0ea556$.dlg@40tude.net> In-Reply-To: <1oj0b4rwma99b$.1iqu11p0ea556$.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Fri, 08 Aug 2014 11:10:27 UTC Organization: TeraNews.com Date: Fri, 08 Aug 2014 05:10:25 -0600 X-Received-Bytes: 1999 X-Received-Body-CRC: 3800517016 Xref: news.eternal-september.org comp.lang.ada:21545 Date: 2014-08-08T05:10:25-06:00 List-Id: 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. -- Is this to say they are a magic bullet? Nope. But that certainly covers a lot of things that would otherwise make for sloppy and error-prone programs -- it keeps things neat, being able to [essentially] say parameter [or return-value] X of subprogram K is a subset of the values of Type T.