roxen.lists.pike.general

Subject Author Date
Fw: thread and lambda PeterPan <zenothing[at]hotmail[dot]com> 26-03-2009

From: Ñ©ËÉ ¹ù
Sent: Monday, March 23, 2009 7:21 PM
To: <pike[at]roxen.com>
Subject: RE: thread and lambda


that bug give out the difference of two type of lambda functions:

* referenced the non-local vars
* not

this is just what I want, if it is a feature than a bug.

It is always possible to make misstakes, but with the different designs of 
language
the probability of make misstakes is different.

If a programmer passed a mapping as an argument, he has muth more 
probability to
be conscious of what he is doing, comparing with using a var in the 
environment.

In the first case, the programmer was thinking about inter-function logic. 
And in the
other case, he was thinking about how to write the current function.

When the programmer think about how to call functions, it's easy to bethink 
of thread things.
But when the programmer focus on writing the code, he can forget much.

> To: <pike[at]roxen.com>
> From: <6341[at]lyskom.lysator.liu.se>
> Subject: Re: thread and lambda
> Date: Mon, 23 Mar 2009 09:20:04 +0000
>
> You lost me. How is that bug related to the thread changes you
> suggest?
>
> I don't really see the point of introducing a warning like the one you
> suggest. It's almost always possible to make misstakes when using
> threads.
>
> Another thing, how would you handle if a thread got passed a mapping
> as an argument? That mapping would be shared amongst all threads which
> gets it as an argument.
>



See all the ways you can stay connected to friends and family