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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-07 04:08:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Anybody in US using ADA ? One silly idea.. Date: Tue, 07 Jan 2003 13:10:53 +0100 Message-ID: References: <1041908422.928308@master.nyc.kbcfp.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1041941315 15379572 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:32663 Date: 2003-01-07T13:10:53+01:00 List-Id: On Mon, 06 Jan 2003 22:00:22 -0500, Hyman Rosen wrote: >Dmitry A. Kazakov wrote: >> Why to put something into anything else? Why not to have the tagged record >> doing everything what you want from the start? > >I'm not sure what specific case we're talking about here, >but in general, one uses generics (or templates) when >complete type information is available at compile time, >and tagged types when type information is available only >at run time. That's silly. Tagged types are good in static case. One may wish generics only if they offers something what tagged types cannot. >Under typical compiler implementations, very large gains in >efficiency become possible using generics, mainly because of >inlining opportunities. This is also possible with tagged types. You are free to make operations inline. The compiler may remove the type tag if it is statically known. Under these conditions a static dispatch would cost nothing. >You may not like this, but the Ada designers clearly saw generics >as a benefit, In 80s there were no alternative to generics. >and the C++ metaprogramming developers have sealed >its fate - generics are here to stay, and will probably become >more enhanced. I have no doubts about it. But the fate of C++ was decided much more earlier, when {} were chosen to indicate a block of statements. You know after that, everything else is just a consequence! (:-)) --- Regards, Dmitry Kazakov www.dmitry-kazakov.de