Subject RE: [IB-Architect] enhancement to procedure/trigger language
Author Jim Starkey
At 03:40 PM 6/6/01 -0400, Leyne, Sean wrote:
>Jim,
>
>IMHO, the label/leave seems to be nothing but a fancy way of performing
>a "goto".
>

That may be your opinion, whoever humble, but it isn't correct.

The scope of a label is a single block. The sole purpose of the
label is permit the block to be exitted from within. It is much
more limited than a goto (shudder). In C, a goto can be used to
create a loop. In Java, a labelled block / named break can only
exit the block, not loop.

The label/leave construct is sometimes called a "come from" and
works to reduce spaghetti in exactly the same way as "return".
(Minor note: the original Pascal did not contain a return, leading
to idiotic mandatory goto's to get out of a function. Ludicrous.)

The syntactic difference between label/leave and your strawman
is the a block is labelled at it's top rather it's bottom. Also
the scope of the label is the block itself, not the entire function.

<serious>
We don't implement a "goto" because it is unnecessary and
leads to bad programming and bad programs. Besides, democratic
language design is how we got Cobol. Good language design
should be left to prima donnas to deliver on stone tablets to
be accepted or rejected in toto. The pieces must fit perfectly.
</serious>

<opinion>
The great languages are LISP, Algol-60, C, and Java.

Examples of mediocre languages are C++, ADA, and Basic. There
are many more.

The truly dreadful languages are COBOL, Pascal, RPG, PL/I,
Algol-68, DCL, and SQL. Committee products, every one.
</opinion>

Jim Starkey