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,9ce095aba33fe8d0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!proxad.net!proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Negative float problem Date: Thu, 03 Nov 2005 14:20:29 +0100 Organization: Adalog Message-ID: References: <1130351574.313991.229420@g14g2000cwa.googlegroups.com> <10mspnley7gzu$.1swtj67sv0ldr$.dlg@40tude.net> <38tcpxwxfigo$.18ysjyp9ml92c$.dlg@40tude.net> <2ybc7t4au7g$.166dxwfrds1so$.dlg@40tude.net> <18nrnlg9zzl5a.k8rl3ajwauqi.dlg@40tude.net> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1131026486 9118 195.25.228.57 (3 Nov 2005 14:01:26 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 3 Nov 2005 14:01:26 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: fr, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:6142 Date: 2005-11-03T14:20:29+01:00 List-Id: Maciej Sobczak a �crit : >> Since you are new to Ada, there is something that you must understand. > > [...] > >> There is no space for "sometimes", "maybe", "depends", and other >> things like that that are common in other languages. > > > I understand what you wanted to say but I don't share the sentiment that > is behind the way you worded it. > > Example: > > I'm writing a library subroutine and in this subroutine I raise an > exception. > Question: can I be sure that the exception will be handled? In other > words: can I be sure that not handling of this exception will be > detected by the language run-time and reported as error? > > Answer: *sometimes* yes, but *sometimes* no - it *depends* and *maybe* > the exception will be quitely lost without anybody noticing it. > > What's the problem in the above? The problem is that there are two > language features - exceptions and tasking - and that they can > *interact*. It is not trivial to come up with correct scheme for this > interaction and if you ask two experts you will get three different > opinions on the issue. That's a totally different issue. Of course, what happens with an exception depends on which context it was raised in. However, the behaviour will be the same on every compiler and every machine. [...] > But please don't use words like "maybe" in order to make the idea look > unserious or not Ada-worthy, or in order to make other languages look > inferior, because it simply does not hold water. The "maybe" I was refering to was about the semantic definition of the language. Ada does its best (but nobody's perfect) to define precisely the semantics of every construct. For example, try to find what "%" does in C/C++ (with at least one negative operand, of course)... > Imagine some Ada programmer decided to learn C++. He comes to the C++ > newsgroup, asks a couple of why this or that and I give him this answer: > > "You are new to C++, so you must understand something: exceptions are > *never* quietly lost. There is no place for "sometimes", "maybe" or > "depends", as in other languages (that you already know). C++ will > protect you." > > Would it help him? No. (in fact, this kind of mentoring attitute can > raise the psychological entry barrier) > Would it move anything forward? No. > Does it hold water? No. > I'm sorry if you took my message as some unpleasant "mentoring attitude". What I was refering to is that Ada has been designed from a requirements document, and that document stipulated that the language had to be uniform and consistent. Sometimes it shows up in not so user-friendly ways, and you have to understand it in order to accept it as "the price to pay". -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr