4 ms·
Obviously due to JavaScript being a scripting language and dynamically typed, we have to make certain assumptions so that we can even consider calling any funct
by philplckthun 10y ago
Obviously due to JavaScript being a scripting language and dynamically typed, we have to make certain assumptions so that we can even consider calling any function "pure".
It's nice that André wants to warn us here about the fact that the term "pure" is more or less accurate depending on the language.
In JS it can depend heavily on previous assumptions and the context, but I'd argue that this is often only due to the arguments that are being passed to a function. A non-safe function that isn't type will always be impure in some contexts. But for sanity reasons we must be able to make assumptions about the arguments.