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,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-19 04:34:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor-online.net!fu-berlin.de!uni-berlin.de!dialin-145-254-037-164.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Anybody in US using ADA ? One silly idea.. Date: Sun, 19 Jan 2003 13:34:40 +0100 Organization: At home Message-ID: References: <1041908422.928308@master.nyc.kbcfp.com> <1041997309.165001@master.nyc.kbcfp.com> <1042086217.253468@master.nyc.kbcfp.com> <1042477504.547640@master.nyc.kbcfp.com> <1042651417.215661@master.nyc.kbcfp.com> <1042743579.1165@master.nyc.kbcfp.com> <1042824191.538184@master.nyc.kbcfp.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-037-164.arcor-ip.net (145.254.37.164) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1042979651 25714406 145.254.37.164 (16 [77047]) User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:33203 Date: 2003-01-19T13:34:40+01:00 List-Id: Hyman Rosen wrote: > Dmitry A. Kazakov wrote: >> If not possible, then it is not a case where generics may be applied. My >> point is, anywhere generics work, the specific type can be tacked down. > > That doesn't seem correct to me. With generics, I can declare a container > that holds a specific type, and then pas sthat container around to other > (generic) routines, and they all know the type of the container's > contents. > > Without generics, all I have is a container that holds some base type. How > is the compiler to know that this container holds only a certain specific > type of object? I see your point. Well, this is another story. I meant containers of class-wide objects. What you meant is the containers of specific types like arrays are. Though it looks like a simplier problem, it is unsolvable in the way I proposed. Here generics or built-in container types are the only options. Anyway array types solve this for one particular case without generics. Maybe, there is a more general way to deal with the containers of all kinds without generics. I do not know. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de