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: f5d71,304c86061dc69dba X-Google-Attributes: gidf5d71,public X-Google-Thread: 1014db,304c86061dc69dba X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,304c86061dc69dba X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,5cb36983754f64da X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-08 07:43:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.java Subject: Re: No call for Ada (was Re: Announcing new scripting/prototyping language) Date: Sun, 08 Feb 2004 14:05:53 +0100 Organization: AdaCL Message-ID: <2460735.u7KiuvdgQP@linux1.krischik.com> References: <20040206174017.7E84F4C4114@lovelace.ada-france.org> <54759e7e.0402071124.322ea376@posting.google.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1076254832 00 31380 f0QHGeHJ8twFsrz 040208 15:40:32 X-Complaints-To: usenet-abuse@t-online.de X-ID: JOCnRGZAZeUnD4q2MJ-wQh8CQjPk7Vkuj621krBE5EXw0wP0DmQw8w User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:5340 comp.lang.c:21145 comp.lang.c++:18128 comp.lang.java:2769 Date: 2004-02-08T14:05:53+01:00 List-Id: MSG wrote: > Ludovic Brenta wrote in message > news:... > > [...] > >> The "zen master" languages are Pascal, Modula, >> Oberon, and, master of masters, Ada. The beauty of these languages is >> that, once you are Enlightened, you can apply your wisdom to other >> languages as well -- but often would prefer not to. > > > Can you do the following in Ada: > > 1. Write *one* bubble-sort function that will work on different > types given an appropriate comparison function Shure you can. Ada invented templates long bevore C++ was even though of. Ada templates are far more powerfull then C++. > 2. If B is a subtype of A, can you pass it to any function that > takes A as an argument? (covariance) subtype as in object orientation: type Parent is tagged null record; type Child is new Parent with null record; or subtype as in simple types: type Day_of_Month is range 1 .. 31; subtype Day_of_Febuary is Day_of_Month range 1 .. 29; Well, the answer is yes in both cases. > 3. If B is a subtype of A, and FA and FB are functions accepting A > and B as arguments, can you use FA wherever FB could be used? > (contravariance) Of corse. > If you answer "yes" to any of the questions, post *compilable* > snippets: we don't want to learn Ada just to verify your claims, > we simply won't believe you. Others did that allready. Besides, you would need an installed Ada compiler to verify anyway. > BTW, the esteemed Mr. E. Robert Tisdale (ER for short) isn't > letting on about why Ada isn't used much at NASA any more. He also won't tell you why Spirit died. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com