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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-01 02:16:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed!fu-berlin.de!uni-berlin.de!dialin-145-254-039-218.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: RE: Ideas for Ada 200X Date: Sun, 01 Jun 2003 11:19:06 +0200 Organization: At home Message-ID: References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-039-218.arcor-ip.net (145.254.39.218) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1054458997 8333289 145.254.39.218 (16 [77047]) User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:38277 Date: 2003-06-01T11:19:06+02:00 List-Id: Robert C. Leif wrote: > Why not make a combination consisting of a tagged type inside of a > generic? Most of the types and objects of the tagged type are generic. > These Metaclasses are a good model of the real world. What do you mean? Unlike C++, Ada has no generic types. The problem is whether the [generic] library has to be based on static vs. dynamic polymorphism. A. Static polymorphism stands for generics (sometimes also for overloading). A generic subroutine is polymorphic in the sense that its body is parametrized by the formal parameters. B. Dynamic polymorphism stands for tagged types (also discriminated types). A dispatching subroutine is polymorphic because it may have different bodies (for different types) Thus you have to choose either A or B. Both approaches have advantages and disadvantages. Theoretically B contains A, but practically it is either impossible or less effective than A in many *very* important cases. Therefore one should clearly inderstand the consequences of any decision made. Especially because neither A nor B have not yet finished their evolution in Ada (and other languages). So any wrong decision for a such important thing as the library which will be used practically everywhere, might freeze present, rather unfortunate, state of OO in Ada (in other languages it is not better). -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de