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,7ee10ec601726fbf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 07:49:18 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: why not Date: 16 Oct 2001 10:44:54 -0400 Organization: NASA Goddard Space Flight Center Message-ID: References: <3BC30674.BA88AAB6@brighton.ac.uk> <9pvv3t$ves$1@news.huji.ac.il> <3BC5D730.DA950CC7@boeing.com> <9q4pa7$1ad$1@nh.pace.co.uk> <3BC6ACC8.23EF21BC@free.fr> <3BC71F54.1FFE78FA@boeing.com> <1KGx7.26476$ev2.35117@www.newsranger.com> <3BC7AD82.2A0CCCD4@acm.org> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1003243606 27531 128.183.220.71 (16 Oct 2001 14:46:46 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 16 Oct 2001 14:46:46 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:14683 Date: 2001-10-16T14:46:46+00:00 List-Id: Jeffrey Carter writes: > Ted Dennison wrote: > > > > Again, this is for the *first* time you try to use something. You don't even > > need to do that, if you can find someone else's instantiation code to clone. > > After that, its just a matter of making the proper "magic incantation" to > > instantiate your generics, and you are good to go. > > Again, magic incantations may be OK if you're a C++ hacker, but we Ada > software engineers avoid them. Since the same effect can be obtained > without investing hours of effort or parroting magic incantations using > other component libraries, I can see no justification for this level of > complexity. My Ada library also seems overly complex at first, compared to the C++ STL. But on closer examination, you realize that it supports things that C++ doesn't. C++ has no limited types, it has no distinction between abstract and concrete types, or between tagged and non-tagged types, as template parameters. C++ does not have arrays as primitive types. Ada has all of these. Thus any generic library that supports _all_ of Ada will be more complex than the "equivalent" C++ library. It is easy to write a list package that will accept an Item_Type of Integer, or any non-tagged, non-private, non-limited, non-abstract type. Allowing it to accept an Item_Type with any combination of those attributes is much harder, but well worth it! Things should be as simple as possible, but no simpler. -- -- Stephe