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-Thread: 103376,42e401e32683b965 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: A new notion: stronglly-typed-by-user language Date: Fri, 16 Apr 2010 09:28:06 +0200 Organization: Adalog Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 16 Apr 2010 07:28:08 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="GkHyU1NAVSDn9og2i84wqg"; logging-data="11942"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bOL+peFu6yFuoAeA5B9Ao" User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) In-Reply-To: Cancel-Lock: sha1:WPrmUt+bta7CSlnBUfEPEIBFRzI= Xref: g2news2.google.com comp.lang.ada:10982 Date: 2010-04-16T09:28:06+02:00 List-Id: Maciej Sobczak a �crit : > On 15 Kwi, 10:59, "J-P. Rosen" wrote: > >> "C++ is a strongly typed language, if conversions between logically >> unrelated types are avoided". >> >> Ain't that cute? > > http://en.wikipedia.org/wiki/Strong_typing > > "these terms have been given such a wide variety of meanings over the > short history of computing that it is often difficult to know, out of > context, what an individual author means when using them." Of course, there is obviously no clear-cut [...] > The statement that you cited is therefore not very convincing. > > In particular, what are "conversions between logically unrelated > types"? > Is Integer'Image such a conversion? What about arbitrary casts between > numeric types? What about unchecked casts? I was expecting someone to come up with Unchecked_Conversion, so you win :-) Do not confuse "weakly type" and "strongly type with a mean to disable it in a controlled way when absolutely necessary". Having no safety belts in a car is not the same thing as having belts and not putting them (as far as the car design is concerned). What I find amusing (or characteristic of the C/C++ spirit) is the idea that "if you are careful, it is good enough". I generally conclude my presentations of Ada with two quotes. The first one is from K&R, in one of the first books about C: "C has been designed under the hypothesis that the programmes is reasonable and knows what he's doing" The other one from ARM's introduction: "Concern for the human programmer was also stressed during the design" C is not for humans... -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr