It seems that the purpose of function foo() constant {} is to indicate that a function does not change the contract's state. And yet, as it states here, the compiler doesn't actually enforce this. So for the time being, is constant simply an unenforced convention? A way to let contract readers know that this function shouldn't change state?
In reality, this bar function works just fine:
contract Foo { uint x; function bar(uint y) constant { x = y; } }