Re: F2008 draft



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


.



Relevant Pages

  • Re: What can be done in FORTRAN that cannot be done in C/C++?
    ... >> no deficiencies and the other way is to make it so complicated ... actually a exception handling is usually a very ... be inherently bound to that scoping rule? ... as a general feature. ...
    (comp.lang.fortran)
  • Re: Goto inside a call statement?
    ... all manner of not-so-normal conditions there, ... Well aren't you making the assumption that the word "exception" ... I/O error (that is, conditons the I/O library identifies as error ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: Default values of functions
    ... I fail to see how this would keep ... Finally doesn't handle or swallow the exception. ... to make it so simple that there are obviously no deficiencies, ...
    (comp.lang.pascal.delphi.misc)