3 ms·
> And how do you need to look at this for it not to be a side-effect? I would look at it like this: while a function can be pure (no side effects), the thread
by runeks 10y ago
> And how do you need to look at this for it not to be a side-effect?
I would look at it like this: while a function can be pure (no side effects), the thread in which it executes need not be a pure construct. It's a property of the runtime system, which, essentially, schedules pure functions to run inside green threads, to which exceptions can be thrown (which will terminate the execution of the pure function).