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,a84eaf8fb2470909 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada generics 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: <1166710494.869393.108730@a3g2000cwd.googlegroups.com> <17fe4xfogg7p5.1dcyc5nyc2gsl.dlg@40tude.net> <1166805696.291429.239590@48g2000cwx.googlegroups.com> <186qujlcx6rwl.1h6eq4mbdaa5s$.dlg@40tude.net> <1167150212.165097.289010@73g2000cwn.googlegroups.com> <1qmdvus6du3xu.1n21tzgev46ia$.dlg@40tude.net> <1167246396.057028.325080@48g2000cwx.googlegroups.com> <15jxp8z1iu5fk.1oeihvavjghgg$.dlg@40tude.net> <1167323355.701067.267200@h40g2000cwb.googlegroups.com> Date: Fri, 29 Dec 2006 12:12:01 +0100 Message-ID: <1sg3f9wjlvhv9$.1gr2edsl31qiz.dlg@40tude.net> NNTP-Posting-Date: 29 Dec 2006 12:11:52 CET NNTP-Posting-Host: 8cd5a3b6.newsspool1.arcor-online.net X-Trace: DXC=JZ7AdZDSQR1RLigj];iP=8ic==]BZ:af>4Fo<]lROoR1^YC2XCjHcb9Fkol<@HbO96DNcfSJ;bb[5IRnRBaCd On 28 Dec 2006 08:29:15 -0800, Hyman Rosen wrote: > Dmitry A. Kazakov wrote: >> They reap what they sowed. Should Ada or C++ go into that mess? > > Well, they have. It comes of being unwilling to say to the rest of the > world that yes, this programming language is based on English, deal > with it. I expect that one day we will get many alternative sets of > keywords so that people can write "loop" and "type" and "generic" in > their own language. Yuck. Maybe it could turn an advantage for Ada being a niche language then. I hope that a pressure to do that will not be high enough to carry out such mess. >> Huh, Ada.Numerics has pi and e... > > I found this on the web: > package Ada.Numerics is > pragma Pure (Numerics); > Argument_Error : exception; > Pi : constant := > 3.14159_26535_89793_23846_26433_83279_50288_41971_69399_37511; > e : constant := > 2.71828_18284_59045_23536_02874_71352_66249_77572_47093_69996; > end Ada.Numerics; > > Those look like rational numbers to me. But they are not. If you are going to extend a language in this direction you should introduce new numeric types, like rational /= float. Further that does no solve the problem. Because float still exists. You cannot define float as mathematical real, that would not be computable. You could say (as it actually is), that float is an interval with rational bounds. But then you would discover that intervals are incomparable (so the empirical rule "never compare floats for equality.") This way or another, it is cannot work. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de