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: 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!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada requires too much typing! Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH 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> Date: Thu, 10 Jun 2010 11:07:29 +0200 Message-ID: NNTP-Posting-Date: 10 Jun 2010 11:07:30 CEST NNTP-Posting-Host: 8af380ca.newsspool4.arcor-online.net X-Trace: DXC=K3O9hm`]FoVU6b:FjPaGjQ4IUK On Thu, 10 Jun 2010 10:44:02 +0200, Yannick Duchêne (Hibou57) wrote: > Le Thu, 10 Jun 2010 10:07:17 +0200, Dmitry A. Kazakov > a écrit: >> Yes. These are abstract interfaces to be defined. This is an easy part >> BTW. > What about “not every thing in the same bag” philosophy ? (many others > failed in this trap) Who? The examples you probably have in mind use implementation inheritance, which is obviously doomed to fail. In order to work, it must be interface inheritance + ad-hoc supertypes (you cannot and need not declare everything in advance). > 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). It is exactly same, because programs themselves are even more dynamic than types relationships. Nevertheless there is SPARK to deal with that. The type system must be designed to help the compiler to do more static analysis, provided that the programmer would be asked to give more annotations to the types. (It cannot be more typing than we already have with generics, with no safety whatsoever!) > 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). I call this type algebra. There are operations that yield types from types and values. Generic instantiation is such an operation. Derivation is another. Array declaration is third. Type constraining is forth, etc. If I were ARG, I would consider the algebraic type operations the language needs, with the goals: 0. SIMPLIFY THE LANGUAGE 1. Reduce generics use no absolute minimum (without performance penalty) 2. Most of currently built-in types must become library-defined 3. The standard container library must be freed of generics 4. The problem of container subtypes to be solved (e.g. when and how a container of subtypes becomes a subtype or not) 5. The problem of containers of class-wides to be solved (+ relation of a container of class-wides to a container of specific types, when, how) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de