[whatwg] Side effects free scripts
Andrew Fedoniouk
news at terrainformatica.com
Sun May 28 18:31:06 PDT 2006
----- Original Message -----
From: "Alexey Feldgendler" <alexey at feldgendler.ru>
> On Sun, 28 May 2006 17:05:45 +0700, Sjoerd Visscher <sjoerd at w3future.com>
> wrote:
>
>>> When a script thread is in side effect free mode:
>>> 1. It stays in this mode until the thread completes.
>>> 2. It can call any non-native function, but the same restrictions
>>> apply.
>>> 3. It cannot assign any variables except locals.
>>> 4. It cannot call any native function except those specifically marked
>>> by the spec as side effects free. For example, sin() is side effects
>>> free, and window.open() is not.
>>> 5. It can read any property that can be normally read.
>>> 6. It cannot assign any property for which a native setter function is
>>> used.
>
>> Ok, here you make it clear that with side effects you only mean visible
>> side effects?
>
> No, all side effects in the mathematical sense. The script is not allowed
> to alter the state of the world in any way.
Axiom:
Code which is not altering the state of the world cannot produce anything
useful (work) for that world.
(C:) Mine.
Andrew Fedoniouk.
http://terrainformatica.com
More information about the whatwg
mailing list