(j3.2006) Public Comment J32034
Jim Giles
JamesGiles-2
Wed Jul 16 13:55:34 EDT 2008
Aleksandar Donev wrote:
...
> The example
>
> CRITICAL
> BLOCK
> code
> END BLOCK
> END CRITICAL
>
> that Jim Giles gave seems legal to me. It may seem more verbose or
> less clear than "CRITICAL BLOCK", but seems just fine to me,
> especially if you don't want to allow declarations inside every block
> construct. BLOCK means "I am declaring things here", and CRITICAL
> means what it means, and using them on the same line or on two
> consecutive lines hardly seems to make any difference. Making
> changes, just like adding features, should be done after
> deliberation, not merely to please the public (comment).
I'm hoping the majority will see the arguments that it's verbose an
less clear as quite valid and that the result of deliberation will be
to combine the features.
As for allowing declarations inside every block (instead of only
every BLOCK), take a look at the languages that have always
permitted that. In C, programmers have always been allowed
to write declarations inside any "compound statement", not
just the one forming the body of a procedure. I've only met
one C programmer that did so extensively. His colleagues
cursed him for it. I've met long-time C programmers that
didn't even remember that such declarations were permitted:
not only didn't they use the feature themselves, but they almost
never saw in code from other sources.
Given the rarity of use of the feature, even when allowed, it's
a good idea to call attention to nested declarations by making it
a separate construct. So, BLOCK is better than letting the
declarations just go anywhere.
J. Giles
More information about the J3
mailing list