[whatwg] Passing more than JSON data to workers

Boris Zbarsky bzbarsky at MIT.EDU
Thu Dec 17 00:48:30 PST 2009

On 12/17/09 12:34 AM, Jan Fabry wrote:
> These three functions are equivalent to me.

They're meant to be, but also meant to be increasing in order of 
analysis complexity.

> If no scope is given, the global scope is used, and then it depends on the state of the variables on the worker side.

Unlike the case when unqualified "foo" was used, in which case it got 
the value of the "foo" property of the global object on the web page 
side?  That's the dichotomy I'm trying to understand.

> I do not have a concrete problem now,

That makes it really hard to design a solution.

> but I am imaging libraries that currently use the nice features of Javascript, like functions being passed around as parameters, to delegate certain behavior to code written by users of their libraries.

It seems very difficult to me to come up with a "function cloning" 
solution that won't break in subtle ways when such functions are passed 
to it...

I'd really like to see specific use cases where we think this could be 
useful, so that we can evaluate possible "function cloning" behaviors in 
terms of their behavior on those use cases.  Designing in a vacuum here 
is not likely to work well, I suspect.

> When this discussion is over, I want to know why it is not implemented: because it leads to some undefinable situations, because it would be too complicated to teach to developers what does and what doesn't work, or because it is too difficult for implementors to do it right. But when I look at what browsers can do these days, I have not yet seen a limit to the intelligence of their developers :-)

Which "it"?


More information about the whatwg mailing list