On Sun, 13 Feb 2011 10:03:16 -0600
"Edward K. Ream" <edream...@gmail.com> wrote:

> I tried to simplify this further, but how to do that?  The exec
> statement is executed for its effects in the *present* namespace.
> Thus, it won't do to put the exec in a function/method, unless it is
> possible to transfer the effects of the exec into the *callers*
> namespace.  I do not know any way to do that, even if (as I attempted
> to do) the wrapper method compares the before and after snapshots of
> the local namespace. Clear?
> 
> In short, I think using a top-level exec is in fact the simplest and
> clearest way.

I just started using that pattern, mostly because this discussion reminded me 
of it, it's very handy.

I think Ville's suggestion was just aesthetic, although it has the advantage of 
not needing to remember the exec() call at the start of each node which needs 
it (they'd all be descendants / later siblings of the @prelude).

Implementation wise, I think @prelude would avoid exec() and just prepend the 
@prelude nodes' text to the script that's assembled for execution in the same 
part of the process which handles @others etc.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to