| Store | Cart

Re: [TCLCORE] Question on coroutines

From: Donald G Porter <d...@nist.gov>
Tue, 08 Dec 2009 09:15:23 -0500
Neil Madden wrote:
> I'm not sure I see in what case the dispatcher needs to do more than a  > simple [eval], though. In what situation do you get a chain of 
control > transfers with yieldTo? (My understanding is that this behaves 
like [tailcall],
> so there should be no chains).

Others can correct if I'm mistaken, but there's a subtle difference 
between [tailcall] and having the caller [eval] a script that is
returned, beyond the convenience of syntax.  [tailcall] resolves
the command name in the context of the [tailcall] command, while
an [eval] in the caller would resolve in the caller context.  Many
times this does not matter, but sometimes it does.

I was assuming from the prior messages that [yieldTo] would follow
the same pattern as [tailcall].

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| dona...@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
miguel sofer Dec 05, 2009 10:25 pm
Donal K. Fellows Dec 07, 2009 01:04 am
Kevin Kenny Dec 07, 2009 02:47 am
Larry McVoy Dec 07, 2009 02:56 am
Kevin Kenny Dec 07, 2009 04:41 am
Neil Madden Dec 07, 2009 09:35 am
miguel sofer Dec 07, 2009 01:41 pm
Kevin Kenny Dec 07, 2009 02:24 pm
Donal K. Fellows Dec 07, 2009 01:08 pm
miguel sofer Dec 07, 2009 01:20 pm
Donal K. Fellows Dec 07, 2009 02:09 pm
miguel sofer Dec 07, 2009 02:24 pm
miguel sofer Dec 07, 2009 04:44 pm
Neil Madden Dec 07, 2009 02:31 pm
Kevin Kenny Dec 07, 2009 02:44 pm
Neil Madden Dec 08, 2009 01:10 pm
Donald G Porter Dec 08, 2009 02:15 pm
miguel sofer Dec 08, 2009 02:22 pm
Kevin Kenny Dec 07, 2009 02:33 pm
Joe English Dec 08, 2009 06:08 pm
miguel sofer Dec 08, 2009 06:15 pm
Messages in this thread