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-15 14:48:57 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Anybody in US using ADA ? One silly idea.. User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Wed, 15 Jan 2003 22:48:39 GMT Content-Type: text/plain; charset=us-ascii 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> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:33052 Date: 2003-01-15T22:48:39+00:00 List-Id: "Dmitry A. Kazakov" writes: > Hyman Rosen wrote: > > > Dmitry A. Kazakov wrote: > >> I agree. As I said, it is a long way to go to get rid of generics. > > > > And as I said, I have no idea why you would want to. > > I think I explained why. You explained why, but I didn't see any explanation of what you would like to do instead. Clearly, I should be able to write a "stack" abstraction (or other data structure) that takes any type as element. And I shouldn't have to write it more than once. And I should be able to constrain any particular stack to have a particular element type, with this type checked at compile time. (Or, I can use a class-wide type as the element, if I want any type in a class.) I'd be interested to know if you have something in mind that meets these criteria. Tagged types in Ada (or the corresponding feature in most other languages) don't give you the compile-time checking. It seems to me that if the feature is not generics or templates, then it would at least have to share some properties with those features. - Bob