Re: F2008 draft
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Mon, 17 Jul 2006 22:17:14 GMT
Joe Krahn wrote:
....
One thing I see is a new block construct that includes a specification
section: BLOCK ... END BLOCK. I wonder why not just allow a
specification section in the current block constructs? Even so, I have
been thinking that some form of "DO ONCE" construct, with EXIT
statements would be nice, to handle one type of construct that often
still seems a good place for GOTOs.
For example, this:
------------------------------
BLOCK
...
IF (error) EXIT BLOCK
...
IF (error) EXIT BLOCK
...
IF (error) EXIT BLOCK
...
RETURN
END BLOCK
... error handling ...
RETURN
------------------------------
This is a variant of Zahn's construct. I've written of this
in detail before. If you're going to have it, its similarity to
some exception handling mechanisms should be examined
(though I don't think it's a good solution for exceptions).
In fact, this is Ada's exception mechanism almost exactly
if you don't count what happens when an exception is raised
that doesn't have a local handler. The syntax is a little
different than you have here.
I had no idea the committee was pursuing a nested scoping
mechanism. I doubt the utility will justify the additional
complexity of the language. Especially not if the mechanism
has no way to block (selectively or in total) host association.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
.
- References:
- F2008 draft
- From: Joe Krahn
- F2008 draft
- Prev by Date: Re: writing output listing onto screen (or not) and onto file
- Next by Date: Re: writing output listing onto screen (or not) and onto file
- Previous by thread: Re: F2008 draft
- Next by thread: gfortran binaries
- Index(es):
Relevant Pages
|