Re: Jim Fulton : Extensible compound statements -- new exec flavor

Ken Manheimer (klm@NIST.GOV)
Thu, 02 Feb 1995 11:06:24 -0500 (EST)

On Wed, 1 Feb 1995, Ty Sarna wrote:

> Ditto. I'm not wedded to my scheme. Yours can do what I want (and more,
> like a cleaner syntax for threads), so I'd be happy to go with it. I do
> agree with Guido that "exec" may not be the best keyword. I think "enter"
> is better, but it applies better to my model than yours. I sort of like
> "with", but it could be confusing to those who are familiar with that
> keyword's totally different use in Pascal.
>
> Actually, how about "as"? As in "execute this code as a transaction (or
> thread, or whatever). "as transaction: ....", "as thread:", etc. Anyone?

Being poorly versed in transactions, threads, and so forth, i've not been
shy about chiming in on this issue. However, i am sufficiently stricken
by the suitability of jim fulton's proposed 'exec' syntax to want to add a
qualified (by my lack of expertise) vote for it.

It seems to me that the enhancement amounts to interjecting a wrapper for
the execution of the following suite (and optional 'else' suite), and that
'exec' is the right thing to "do" that. It strikes me to be a clean and
cogent way to articulate otherwise complicated mechanisms, like threads
and transactions.

In thinking about the syntax, a few alternatives occurred to me:

by thread: suite...

or

within thread: suite...

However, i think 'exec' is much more suitable and appropriate than either
alternative.

(And i happen to like keeping the number of keywords small. Incidentally,
while playing with configuration of emacs font-lock, i distinguished the
highlight for flow-of-control vs other keywords, and noticed that the
control keywords are used, at least in my typical code, vastly more often
than others. Perhaps i shouldn't be surprised, but it seems neat.)

Ken
ken.manheimer@nist.gov, 301 975-3539