TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< 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]>
Subject:
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,
ADA.NUMERICS.GENERIC_ELEMENTARY_FUNCTIONS ?


> 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 ?

Regards,
--
------------------------------------------------------------------------
   Toshitaka KUMANO <[log in to unmask]>

ATOM RSS1 RSS2