comp.lang.ada
 help / color / mirror / Atom feed
From: Colin Paul Gloster <Colin_Paul_Gloster@ACM.org>
Subject: Re: another way to shoot yourself in the foot?
Date: Fri, 11 Jul 2008 16:02:37 +0100
Date: 2008-07-11T16:02:37+01:00	[thread overview]
Message-ID: <Pine.WNT.4.64.0807111541300.9212@teor2> (raw)
In-Reply-To: <zLtdk.215732$SV4.112331@bgtnsc04-news.ops.worldnet.att.net>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 2454 bytes --]

On Thu, 10 Jul 2008, James Giles wrote:

|-----------------------------------------------------------------------|
|"[..]                                                                  |
|                                                                       |
|[..]  For example                                                      |
|(and I think this is the original context), integer arithmetic should  |
|be exact if it doesn't overflow.  No one would accept an implementation|
|that did otherwise, but the standard should actually require it."      |
|-----------------------------------------------------------------------|

I am not sure which of "an implementation of Fortran" and "an
implementation of any language" "an implementation" was an
abbreviation of above.

In 1999, the Java BigInteger class was not required to provide exact
arithmetic in the absence of overflow.

|-----------------------------------------------------------------------|
|"Many other languages also don't explicitly require such things.       |
|I'm not certain that Ada does."                                        |
|-----------------------------------------------------------------------|

This has been required of Ada for over twenty-five years. From
HTTP://archive.AdaIC.com/standards/83lrm/html/lrm-03-05.html#3.5.4
:"[..]

The same arithmetic operators are predefined for all integer types
(see 4.5). The exception NUMERIC_ERROR is raised by the execution of
an operation (in particular an implicit conversion) that cannot
deliver the correct result (that is, if the value corresponding to the
mathematical result is not a value of the integer type). [..]

[..]"

I am grateful to James Giles; Dick Hendrickson; François Jacq;
and Richard Maine for their helpful and clearly time-consuming
clarifications of Fortran semantics and tool issues. It is unfortunate
that Richard Maine ignored that every time I pointed out that Ada
suffers from some of these problems. It was clear from the reponses
however, that Ada is better overall. No language is perfect and a
number of theorems from computer science show that no language can be
perfect.

Just because I am convinced that Ada is better overall does not mean
that I shall never use Fortran, so I hope that news:comp.lang.fortran
participants will be helpful again when I need help with the language
again.

With best regards,
Nicholas Colin Paul Gloster

      reply	other threads:[~2008-07-11 15:02 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20  9:03 another way to shoot yourself in the foot? fedya_fedyakoff
2008-06-20  9:34 ` Dmitry A. Kazakov
2008-06-20  9:48   ` fedya_fedyakoff
2008-06-20 10:01     ` Ludovic Brenta
2008-06-20 10:05 ` christoph.grein
2008-06-20 10:26   ` Dmitry A. Kazakov
2008-06-20 16:12     ` Adam Beneschan
2008-06-20 15:48   ` Adam Beneschan
2008-06-20 19:27   ` Robert A Duff
2008-06-20 23:37     ` Jeffrey R. Carter
2008-06-21  8:56       ` Dmitry A. Kazakov
2008-06-22 20:44         ` Robert A Duff
2008-06-23  7:49           ` Dmitry A. Kazakov
2008-06-24  4:02             ` george.priv
2008-06-24  7:30               ` Dmitry A. Kazakov
2008-06-24 17:16                 ` Robert A Duff
2008-06-24 19:15                   ` Jeffrey R. Carter
2008-06-24 20:31                     ` Robert A Duff
2008-06-24 20:50                       ` Ludovic Brenta
2008-06-24 23:02                         ` Robert A Duff
2008-06-24 23:42                         ` Georg Bauhaus
2008-06-24 21:24                       ` Jeffrey R. Carter
2008-06-24 23:24                         ` Robert A Duff
2008-06-25 15:07                       ` Adam Beneschan
2008-06-24 14:59             ` Adam Beneschan
2008-06-24 16:41               ` Dmitry A. Kazakov
2008-06-24 17:20                 ` Robert A Duff
2008-06-24 17:52                   ` Dmitry A. Kazakov
2008-06-24 23:35                     ` Georg Bauhaus
2008-06-25  8:09                       ` Dmitry A. Kazakov
2008-06-25 10:32                         ` Georg Bauhaus
2008-06-25 12:06                           ` Dmitry A. Kazakov
2008-06-22 20:37       ` Robert A Duff
2008-06-22 21:25         ` Jeffrey R. Carter
2008-07-04 20:52           ` Colin Paul Gloster
2008-07-04 22:15             ` (see below)
2008-07-05 16:06               ` Colin Paul Gloster
2008-07-05 13:38             ` Gary Scott
2008-07-05 16:42               ` Colin Paul Gloster
2008-07-05 19:00                 ` Gary Scott
2008-07-09 19:39                   ` Colin Paul Gloster
2008-07-09 20:35                     ` Richard Maine
2008-07-09 22:49                       ` Terence
2008-07-10  1:07                         ` Gary Scott
2008-07-10 14:10                       ` Colin Paul Gloster
2008-07-10 14:57                         ` fj
2008-07-10 16:47                           ` Richard Maine
2008-07-10 17:03                         ` Dick Hendrickson
2008-07-10 17:26                           ` Craig Powers
2008-07-10 19:55                             ` James Giles
2008-07-10 20:45                               ` Dick Hendrickson
2008-07-10 21:22                                 ` Richard Maine
2008-07-10 21:29                                   ` Craig Powers
2008-07-10 20:45                               ` Craig Powers
2008-07-10 19:51                           ` James Giles
2008-07-11 15:02                             ` Colin Paul Gloster [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox