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-Thread: 103376,640b65cbfbab7216 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!194.134.4.14.MISMATCH!news2.euro.net!feeder.news-service.com!newsfeed.freenet.de!news.germany.com!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Untyped Ada? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <47F26C46.3010607@obry.net> <44d88b93-6a90-4c18-8785-2164934ba700@a9g2000prl.googlegroups.com> Date: Fri, 4 Apr 2008 19:38:19 +0200 Message-ID: NNTP-Posting-Date: 04 Apr 2008 19:38:18 CEST NNTP-Posting-Host: 6b1e1c44.newsspool4.arcor-online.net X-Trace: DXC=M=^;DmFSh0[V0Pe9PRnbJ\4IUKRD1S^[Hl1L=X[6LHn;2LCV^COgUkn_?_Y_U>SXDZ55XKT:gXR9@Rj^bX X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20811 Date: 2008-04-04T19:38:18+02:00 List-Id: On Fri, 4 Apr 2008 08:16:04 -0700 (PDT), Graham wrote: > 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. But you can do that. Provided you knew the semantics of Integer + Float your hands are free. Define function "+" (Left : Integer; Right : Float) return Float; Here you are. The compiler does not define it for you for just one reason. The semantics of this operation cannot be universally defined. Integers and Floats have contradicting algebraic properties. + is exact for the former and inexact for the latter. Therefore if adding them makes sense, that is specific for the application which gives an interpretation to Integer and Float in some way. In other words it is your business. > I dare say that you wouldn't want to program a missile in such a loose > way, but for the kinds of things I'm involved in - financial apps and > simulations - the level of strictness of Ada would be a turn-off for > many developers. This puzzles me. Do not financial applications have quite strict requirements imposed numeric behavior? Or are you writing for Bear Stearns? (:-)) > Sorting out string handling out would be nice, too. What do you mean? In fact Ada's fixed strings handling is the best I know. You should never need Unbounded_String except for rare cases, when you wanted to return two strings out of one function. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de