Chaim Frenkel wrote:
> >>>>> "SF" == Steve Fink <[EMAIL PROTECTED]> writes:
> SF> Or what about a variable attribute:
> 
> SF> my $x : transactional
> 
> SF> and making the effect completely lexical? Why would other scopes need to
> SF> see such variables?
> 
> You haven't handled the multiple variable variety. You will need to
> able to have a group of variables be transaction protected.

I was thinking about this same problem while reading RFC 130. It seems
like transactions and exceptions are closely related. Should we combine
the two?

  try transaction {
     ...
  }

That's a really interesting extension to exceptions -- code that has
no side-effects unless it finishes. BTW, how useful are transactions on
internal variables if we don't provide I/O transactions too?

Since the "transaction" keyword can only appear after "try", it
doesn't have to appear as a new global keyword.

This type of language feature strikes me as something similar to the
Pascalish "with" proposal -- the "transaction" keyword triggers munging
of the variables used in the following block. Obviously the munging
is very different between these, but if we allow the general concept
of munging the intermediate code (parse tree or OP tree or whatever),
then both "with" and "transation" might be implemented from user code
outside the core.

- Ken

Reply via email to