4 ms·
Purity is a poor word. It refers to referential transparency: if I give you an input to your foo function, “A”, and I get an output, “a”, then I can always subs
by agentultra 4y ago
Purity is a poor word. It refers to referential transparency: if I give you an input to your foo function, “A”, and I get an output, “a”, then I can always substitute foo “A” for ”a” in my program and it will not change the meaning.
It’s poor because it invites other meanings: some people think purity means immutability for example; but that’s only part of it.