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,640b65cbfbab7216 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!q27g2000prf.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Untyped Ada? Date: Fri, 4 Apr 2008 09:18:42 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1bc8fd1b-8aa2-48ad-a3fe-269730d38aca@q27g2000prf.googlegroups.com> References: <47F26C46.3010607@obry.net> <44d88b93-6a90-4c18-8785-2164934ba700@a9g2000prl.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1207325922 28796 127.0.0.1 (4 Apr 2008 16:18:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 4 Apr 2008 16:18:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q27g2000prf.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20806 Date: 2008-04-04T09:18:42-07:00 List-Id: On Apr 4, 8:16 am, Graham wrote: > On Apr 1, 11:00 pm, "Phaedrus" wrote: > > > Certainly it is an important part of Ada, but I wasn't suggesting that it be > > deleted entirely. However, it might be handy to have a less-strongly typed > > version of Ada, for instance to create prototypes faster and easier. Then, > > aspects of the prototype could be migrated into a "fully typed" arena once > > the "quick and dirty" prototype was completed. > > > Just thinking a little bit outside the ol' box, here... > > > Brian > > I haven't been using Ada for all that long, but I have been thinking > that a kinder, gentler version would be nice in some circumstances. > Not necessarily *no* type-checking, but the ability to mix, say, > integers, fixed-point types and floats in an equation without > cluttering up the code with conversions. The danger, of course, is that if the language allowed this, it wouldn't catch some errors that a programmer could make, e.g. adding a number of days to an amount of money (since you work on financial applications). But if there are certain operations that make sense on certain specific types, you can define them yourself in a package, and then another package could USE the package with the operations to be able to use the operations that make sense, without type conversions. That might even be better than using type conversions. If you have too many type conversions, a programmer could get into the habit of just converting everything and may accidentally convert "money" to "days" without thinking about it. But explicitly defining the operators that make sense will force you to think about which operators make sense and which don't. Ada programmers dealing with physical units have been doing this sort of thing for a long time, with functions like: function "*" (X : Feet; Y : Pounds) returns Foot_Pounds; -- Adam