[whatwg] Side effects free scripts
news at terrainformatica.com
Wed May 31 21:25:38 PDT 2006
----- Original Message -----
From: "liorean" <liorean at gmail.com>
> The problem is that verifying whether function may result in side
> effects is a pain that must be delayed until runtime. You cannot know
> that methods, functions or constructors are side effect free unless
> they are host objects and readonly. You can't even assume that
> hello+' world';
> is side effect free since the hello variable might contain an object
> with a toString method that has side effects.
> So, determining if a function is side effect free needs to be done
> while that function is run.
Exactly! So to run such function in runtime you need sandbox each time.
Quod erat demonstrandum.
More information about the whatwg