TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Thu, 23 Aug 2001 18:14:33 +0900
Reply-To: Toshitaka KUMANO <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"
Organization: Mitsubishi Electric Corporation
From: Toshitaka KUMANO <[log in to unmask]>
Parts/Attachments: text/plain (49 lines)
Pascal Obry wrote:
> It seems nice but in real program I have rarely see this kind of code.

You may rarely see.

I see and write lots.

How about many of GNAT runtime, for example,

> In the
> case of raise statement there is almost always some recovery code before the
> raise

If the subprogram does not update some library level resources
nor out paremters, no recovery is necessary.

There can be many situation with no recovery ?

> and also more and more we use of Exceptions.Raise_Exception.

Only to add Message string ?

 # There is another room for language extension :-)
 # Such as
 #     raise Argument_Error when Left > Right
 #        with "Invalid Combination";
 # :-)

> In the case
> of the return, there is often in a branch with some code before...

There may be. Yet it may be unnecessary in some cases.

Your mention here is true for "exit when" ? :-)

> Of course
> if is always possible to add a boolean variable and use 'return ... when'...

Sorry. I cannot understand this statement. Could you elaborate ?

   Toshitaka KUMANO <[log in to unmask]>