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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable 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!news.ecp.fr!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sat, 03 Aug 2013 09:35:53 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Generics vs. O-O? References: <6238c325-79c5-4537-ba55-2800110dc6df@googlegroups.com> <1wugpqyea6s39$.e2e8eshup5wn$.dlg@40tude.net> <51fadf40$0$6557$9b4e6d93@newsspool4.arcor-online.net> <15qso6tlt3uf1.h45wqc019b00$.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <51fcb2d7$0$6553$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 03 Aug 2013 09:35:51 CEST NNTP-Posting-Host: b7505990.newsspool4.arcor-online.net X-Trace: DXC=:X:WicIZF?f^Y=RbYBPl4`4IUKejVhC22^Ti>BaZj2]5P8RCalMl X-Complaints-To: usenet-abuse@arcor.de Xref: news.eternal-september.org comp.lang.ada:16670 Date: 2013-08-03T09:35:51+02:00 List-Id: On 03.08.13 02:04, Yannick DuchĂȘne (Hibou57) wrote: > Le Fri, 02 Aug 2013 10:11:32 +0200, Dmitry A. Kazakov a Ă©crit: >> Here substitutability encompasses all parameters generics take, not just >> types. E.g. >> >> generic >> with function Foo (X : Integer) return Real; >> package Bar is ... >> >> You cannot verify if Baz >> >> function Baz (X : Integer) return Real; >> >> were substitutable in Bar for Foo. > > I agree with this. Ability to require constraints on type parameters is missing. As an example, I wish I could state it must have some representation set on some value, or require some preconditions and postconditions. > Maybe we should coin terms such as "weakly subtyped", or "weakly constrained" so as to better understand the foundation of Dmitry's arguments in an Ada context?