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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5af5c381381ac5a7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!news.k-dsl.de!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Ada requires too much typing! Date: Thu, 10 Jun 2010 10:44:02 +0200 Organization: Ada At Home Message-ID: References: <03f84a0a-e070-43a9-9b68-920345f64f94@r27g2000yqb.googlegroups.com> <1c704c1e-1b2e-427f-ae0e-3b2a0f976c7c@y4g2000yqy.googlegroups.com> <14cxhfhcbdmaa$.gp6rbqu5865h.dlg@40tude.net> <457b9c75-1c94-4137-a823-2db342cb26d1@c10g2000yqi.googlegroups.com> <1bghlzj6b2s34.19id3bthuckg5$.dlg@40tude.net> <4c0facec$0$6991$9b4e6d93@newsspool4.arcor-online.net> <101ot9m0ul54n$.6ktxh9d7h6td$.dlg@40tude.net> NNTP-Posting-Host: V5c8K/i9W6tPzBeTPWRJ1g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.53 (Win32) Xref: g2news1.google.com comp.lang.ada:11563 Date: 2010-06-10T10:44:02+02:00 List-Id: Le Thu, 10 Jun 2010 10:07:17 +0200, Dmitry A. Kazakov = a =C3=A9crit: >> What would become formal parameters, like type parameters ? > > Base types, class-wide types. > >> Overloading >> functions returning type derived from that of the ancestor one ? OK. = So, >> this will require an original bas type in the root definition which = >> could >> be wide enough to reach actual capabilities of generics. An =E2=80=9C= ANY=E2=80=9D type >> (like in QBasic) ? > > Nope. The element of a stack is not just any type. It is a copyable ty= pe > (the class "private" in terms of Ada generics). > >> An abstract base type ? OK. So, now, we will need to be >> able to declare abstract base type, that is, abstract discrete types,= = >> etc. >> Is that what's in your mind ? > > Yes. These are abstract interfaces to be defined. This is an easy part= = > BTW. What about =E2=80=9Cnot every thing in the same bag=E2=80=9D philosophy = ? (many others = failed in this trap) Moving generics to dynamic polymorphism... would be= = dynamic polymorphism where there was a kind of static polymorphism. And = = this is not the same from the point of view of program proof you like so= = much (me too, I like). Is there some kind of meta-class in you idea of a new modal ? (generics = = can define new types and thus can initiate new class of types, you will = = meta-class to achieve the same). -- = There is even better than a pragma Assert: a SPARK --# check. --# check C and WhoKnowWhat and YouKnowWho; --# assert Ada; -- i.e. forget about previous premises which leads to conclusion -- and start with new conclusion as premise.