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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f5de0f20558e30f2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-14 12:25:13 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: kcline17@hotmail.com (Kevin Cline) Newsgroups: comp.lang.ada Subject: Re: Implicit Instantiations - was: Re: Why is Ada NOT a good choice for a beginner to programming? Date: 14 Jan 2003 12:25:13 -0800 Organization: http://groups.google.com/ Message-ID: References: <3E23A88A.2C0969B0@adaworks.com> NNTP-Posting-Host: 192.76.54.20 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1042575913 31774 127.0.0.1 (14 Jan 2003 20:25:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 14 Jan 2003 20:25:13 GMT Xref: archiver1.google.com comp.lang.ada:33014 Date: 2003-01-14T20:25:13+00:00 List-Id: Richard Riehle wrote in message news:<3E23A88A.2C0969B0@adaworks.com>... > "Grein, Christoph" wrote: > > > It is true, there are some places in Ada where implicit declarations or type > > conversions are done, but implicit instantiations are as yet nowhere. > > Implicit type conversions, along with implicit type promotions run > counter to the Ada philosophy. > C++ does not provide the same kind of capability for declaring new > numeric types one has in Ada. This, in spite of the entertaining > example from Mr. Rosen. C++ doesn't provide them explicitly. But writing classes which mimic Ada's numeric types is not difficult. The C++ philosophy is generally not to add features to the language which can be easily provided by a library. > The whole idea of Ada is to declare types so they will be checked by > the compiler and so mismatches will be caught. If there is a problem > with that, in the current standard, it needs to be fixed, but implicit > conversions or promotions is simply a bad idea for this language. No one wants implicit conversions or promotions. But implicit instantiation of generic types would aid the development of type-safe code. > Actually, I don't think there is really a problem here wrt Ada, even > after reading your paper. Given that strong type checking was a main goal in Ada's design, I think Ada's inability to do compile-time validation of computations involving physical units should be considered a rather serious flaw in the language.