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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-10 07:42:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Steven Deller" Newsgroups: comp.lang.ada Subject: RE: ada vs. cpp Date: Wed, 10 Oct 2001 10:36:01 -0400 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1002724937 46430 137.194.161.2 (10 Oct 2001 14:42:17 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 10 Oct 2001 14:42:17 +0000 (UTC) To: Return-Path: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 In-Reply-To: Importance: Normal Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk X-Reply-To: List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:14156 Date: 2001-10-10T10:36:01-04:00 > -----Original Message----- > From: comp.lang.ada-admin@ada.eu.org > [mailto:comp.lang.ada-admin@ada.eu.org]On Behalf Of Lutz Donnerhacke > Sent: Wednesday, October 10, 2001 7:21 AM > To: comp.lang.ada@ada.eu.org > Subject: Re: ada vs. cpp > > * Dmitry Kazakov wrote: > >1. If you mean that Ada has no type to represent the whole set of all > >integers, yes it is true. [as well as it is for all other languages > >designed for finite discrete machines] > > man Haskell. (or any other lazy evaluation language with > unlimited arithmetics) Of course that is limited by the machine memory, so it is unlimited, but not infinite and thus doesn't cover all integers either. Numerous unlimited arithmetic packages have been defined in Ada for integers, for rational's and for floating point. Any type derived from those packages have the unlimited aspect you are looking for. And they are used "naturally", e.g. with unlimited_integers; use unlimited_integers ; -- I personally think this is justified for arithmetic packages procedure test is a,b,c : unlimited_integer ; begin a := unlimited_integer(100); -- a := 100; -- if mixed arith defined in the package b := unlimited_integer(100); c := a**b ; -- not your ordinary integer :-) a := c**c ; -- likely to overflow machine memory :-( exception when storage_error => -- code to handle machine limits end test ; I also believe one could create a symbolic processing type, which just collected operators without evaluation, and doing symbolic simplification before assignments. True lazy evaluation. Hmmm -- might be interesting to define, since there would have to be symbolic literals. Regards, Steve "Then, after a second or so, nothing continued to happen." Steven Deller Smooth Sailing LLC 410 757 6924 deller@smsail.com