Ken Fox wrote:
> 
> 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.

Um, I think it should only affect C<local>ized variables, since
transactionalizing dovetails so neatly with the semantics of C<local>.


> BTW, how useful are transactions on
> internal variables if we don't provide I/O transactions too?

Well, *very*, I would think; but, of course, having IO xactions *too*
would be good.


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

Well, why?  Perhaps it is not desired that the exception-catching
be done at the same level as the transactional scope.

        eval {
                $foo = 1;
                trans {
                        local $foo = 2;
                        die;
                }
        };

As a trivial case, perhaps exceptions are not being caught at all.

-- 
John Porter

        We're building the house of the future together.

Reply via email to