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,d7b303cc707b3cd4 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!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: Universal type Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1186165731.373877.257550@i13g2000prf.googlegroups.com> <1186165860.283741.102790@m37g2000prh.googlegroups.com> <1ahn79bfztaga.35cwalkctrgj$.dlg@40tude.net> <1186173305.970431.205500@g4g2000hsf.googlegroups.com> Date: Sat, 4 Aug 2007 09:21:52 +0200 Message-ID: NNTP-Posting-Date: 04 Aug 2007 09:21:42 CEST NNTP-Posting-Host: 45ead581.newsspool1.arcor-online.net X-Trace: DXC=UeUm2S@hUXP5TOT9_N5i\BH3YR:P?e3KLE]DZDNcfSJ;bb[UIRnRBaCdJB7;Y X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:1361 Date: 2007-08-04T09:21:42+02:00 List-Id: On Fri, 03 Aug 2007 13:35:05 -0700, Maciej Sobczak wrote: > My answer to the above question: Java people added generics and (more > or less) typesafe collections for a reason - their initial idea of > storing anything in a single collection didn't please even themselves. Java people added generics because it was fashionable at that time. Generics or not, the problem stays. The set of types in the class of the list items does not have common methods. Here class = the set of all types an item of *the* list may have. Note that generics change here absolutely nothing to better: generic type Item is ... package Generic_Container is Each instance of this package has exactly one type of items => all items of a list have *same* type. Generics provide one polymorphic implementation for lists of many types, but that does not make lists themselves polymorphic. Don't mix a macro and its expansions. (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de