I don't know anything about Ethereum, but if functions rely on external shared state then they aren't pure functions, are they?
I don't know anything about Ethereum, but if functions rely on external shared state then they aren't pure functions, are they?
On a pedantic level, you're absolutely correct, but real-world usage generally makes 'function' equivalent to 'subroutine', hence why we have the specific term pure function to disambiguate.
Moreover, there is a staggering amount of precedence for using "function" without implying purity, so even if Solidity did call them functions, that would be entirely normal terminology.
And, well, the entire point of invoking a contract is to effect some change to the state of the blockchain, so it would be strange to expect that Solidity methods were pure functions.
You are talking about referential transparency. Even functions that are not pure can be referentially transparent.