How would "purity" be determined? Would it depend on if the function is a closure on any outer scope? Would it depend on whether the function mutates any objects passed to it? What counts as mutation?
It seems like it might be better, instead of having `isPure`, being more barebones. There are a lot of attributes a function can have. `isClosure` might be useful, etc. ger than the callback, that might also be safe for not wrapping in the membrane. I'm thinking of a DOM NodeFilter object where the acceptNode method modifies the filter, but the filter is defined via a let statement in a small scope statement-block. Since I don't know what to call this kind of function, I'll temporarily call it "pure within a scope" until someone corrects me. What I mean by "pure within a scope" is that the function's only side effects involve objects within that set.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

