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!news4.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Untyped Ada? From: Georg Bauhaus In-Reply-To: References: <47F26C46.3010607@obry.net> <44d88b93-6a90-4c18-8785-2164934ba700@a9g2000prl.googlegroups.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1207335158.23925.68.camel@K72> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Date: Fri, 04 Apr 2008 20:52:38 +0200 Organization: Arcor NNTP-Posting-Date: 04 Apr 2008 20:52:38 CEST NNTP-Posting-Host: 7c3c4388.newsspool4.arcor-online.net X-Trace: DXC=O\Jie<\IA;^1`E>oC;JXEZ4IUKRCDlDUMXnlh[PCY\c7>ejVX[f6O@?Qkc]WfQJfn?[1b;Y X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20817 Date: 2008-04-04T20:52:38+02:00 List-Id: On Fri, 2008-04-04 at 19:38 +0200, Dmitry A. Kazakov wrote: > On Fri, 4 Apr 2008 08:16:04 -0700 (PDT), Graham wrote: > > 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? > (:-)) I suppose it depends on (a) type of finance and (b) on whose side you're on. Say money is passed to/from a private customer. (Or, to the state.) There are strict rules for how to add two money values when these are the results of division, say. Thus they may need a smaller fractional unit than the smallest currency unit permits: "Here is $ 1. We are three. We'll divide the dollar evenly. Each of us gets ..." Ada's fixed point numbers are practical here. There are really no rules when it comes to market analysis, portfolio optimizing, and so on, as long as operation of the software generates money, or is o.K. for the scientific community. There should not be any obvious signs of negligence in the software, though. Obvious negligence in number handling might potentially be used to provide evidence of fraud. Market participants may want fraud, or the friendlier forms of financial advantage, but you want to avoid evidence. Avoid precise evidence for sure. So the rules for computing with numbers can be different from what you'd expect from a SPARK type machine control programming style, I suppose. Likely some variables and functions will be controlling the algorithms, reflecting what is important. They'll read something like Xyz_At_Stake : Some_Type; function Noticeable_Change (Now, Then: Money; Interval: Time_Span) return Boolean; Anything that works is acceptable. Not everywhere, but some companies can operate with just the necessary level of precision in their products. The dominant question is rather whether or not the software works profitably. Also, whether the software can be used as a subsidiary instrument to generate profit, e.g. as a showcase. It does then not matter much what the software is computing, *exactly*. More important than producing correct results WRT some econometric formulas, it should compute something reasonable, i.e. results that can be defended and that are useful in persuading someone to sign a contract. Let's call it computer age scientific sales promotion. (I mean in the sense of positive science, said without bias.) If you read about the current money crisis, one cause is attributed to (the lack of) trust among traders. The theory of trust as a function value is not yet fully established, let alone established with precision. How could it? Scientific, even computable, rationalization of the trading business? Would you want to pay for being replaced with a computer program? So the financial market has a more extensive set of rules about number handling than machine control I suppose. > 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. Replacements of varying length are ssllllloooooooowww.