Can someone please help me understand why this smart contract compiles in ReMix?
What is the purpose of the word constant if it doesn't preclude the code from changing the state? I'm looking for a technical answer that explains why Solidity allows this, not just says "that's the way it is."
pragma solidity ^0.4.9;
contract ShouldNotCompile {
address addr;
function getSender() constant returns (address) {
addr = msg.sender;
return addr;
}
}