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 X-Google-Thread: a07f3367d7,f135b0b2991e6686 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!feeds.phibee-telecom.net!ecngs!feeder2.ecngs.de!newsfeed.kpn.net!pfeed09.wxs.nl!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: C++0x : no 'concepts' Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <0157a9fd-a1b2-473d-bc85-f84911720520@o41g2000yqb.googlegroups.com> <4aa79ba6$0$32663$9b4e6d93@newsspool2.arcor-online.net> Date: Wed, 9 Sep 2009 14:39:44 +0200 Message-ID: <1myjt3v3dwqj3.1t8nncvu2ty3l$.dlg@40tude.net> NNTP-Posting-Date: 09 Sep 2009 14:39:44 CEST NNTP-Posting-Host: cc01f7a5.newsspool4.arcor-online.net X-Trace: DXC=Gck7Wkg2Bd>4[@iDJW8 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:8247 Date: 2009-09-09T14:39:44+02:00 List-Id: On Wed, 09 Sep 2009 14:12:21 +0200, Georg Bauhaus wrote: > Martin schrieb: >> Crickey! How glad am Ada has strong typing and a generic contract >> model!! >> >> http://www.ddj.com/cpp/218600111 >> >> And that was going to make life 'simpler'!?!?!? > > Just saw this, addressing the question: > > "The current definition of concepts and requirements for use drowns the > programmer in complexities of a magnitude not warranted by the need to > express type-checked 9constrained) generic programming." > > From: Simplifying the use of concepts, linked in the article. > > - > > Fantasizing, could we have, in Ada, > > - recursive instantiations of pure generics? Huh, the second edition of interfaces, now for the "Ada preprocessor"? I read you that all instances of the same body when instantiated automatically will be considered "same". Right? > - an optional Compiler package? The idea of Ada generics is that types aren't checked beyond a handful of built-in classes like "<>", "private", "limited private" etc and operations specified explicitly as formal parameters. This is not a contract of a type or a set of types, that can be dealt with, e.g. constrained, extended, at least named. If you had truly "type-checked & constrained" formal generic parameter, you would not need to handle it as a subject of wild substitutions in the generic unit. You would probably be able to use it as-is, without instantiation... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de