comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Negative float problem
Date: Thu, 03 Nov 2005 14:20:29 +0100
Date: 2005-11-03T14:20:29+01:00	[thread overview]
Message-ID: <oq2dkd.1a7.ln@hunter.axlog.fr> (raw)
In-Reply-To: <dkcmjf$pej$1@sunnews.cern.ch>

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



  reply	other threads:[~2005-11-03 13:20 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-26 18:32 Negative float problem Luke
2005-10-26 19:05 ` Samuel Tardieu
2005-10-26 20:42 ` Robert A Duff
2005-10-27  8:05   ` Robert I. Eachus
2005-10-27 14:48     ` Robert A Duff
2005-10-27 15:07       ` Maciej Sobczak
2005-10-27 15:47         ` Robert A Duff
2005-10-28  8:34           ` Maciej Sobczak
2005-10-29 23:39             ` Brian May
2005-10-30  9:11             ` Dmitry A. Kazakov
2005-10-31  9:46               ` Maciej Sobczak
2005-10-31 14:20                 ` Dmitry A. Kazakov
2005-11-01 11:06                   ` Maciej Sobczak
2005-11-01 14:06                     ` Robert A Duff
2005-11-01 14:46                       ` Martin Dowie
2005-11-01 16:04                         ` Hyman Rosen
2005-11-01 17:19                           ` Martin Dowie
2005-11-02  0:13                         ` Robert A Duff
2005-11-02  6:59                           ` Martin Dowie
2005-11-02 13:24                             ` Robert A Duff
2005-11-02 15:22                               ` Martin Dowie
2005-11-01 15:12                       ` Maciej Sobczak
2005-11-02  0:28                         ` Robert A Duff
2005-11-02  4:16                           ` Steve Whalen
2005-11-14  7:26                           ` Dave Thompson
2005-11-20  0:19                             ` Robert A Duff
2005-11-20 11:07                               ` Dmitry A. Kazakov
2005-11-01 14:27                     ` Dmitry A. Kazakov
2005-11-01 15:19                       ` Maciej Sobczak
2005-11-01 19:44                         ` Dmitry A. Kazakov
2005-11-02  9:04                           ` Maciej Sobczak
2005-11-02 11:17                             ` Dmitry A. Kazakov
2005-11-02 13:03                               ` Maciej Sobczak
2005-11-02 14:20                                 ` Jean-Pierre Rosen
2005-11-02 20:15                                   ` Jeffrey R. Carter
2005-11-03 13:06                                     ` Jean-Pierre Rosen
2005-11-03 18:32                                       ` Jeffrey R. Carter
2005-11-03  9:51                                   ` Maciej Sobczak
2005-11-03 13:20                                     ` Jean-Pierre Rosen [this message]
2005-11-03 15:02                                       ` Maciej Sobczak
2005-11-03 18:55                                         ` Frank J. Lhota
2005-11-04  9:32                                           ` Maciej Sobczak
2005-11-03 20:59                                     ` Simon Wright
2005-11-02 13:32                               ` Robert A Duff
2005-11-02 14:44                                 ` Dmitry A. Kazakov
2005-11-02 13:47                               ` Dmitry A. Kazakov
2005-10-27 18:33       ` Dmitry A. Kazakov
replies disabled

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