It's a very practical concern. Sure you are perfect and will never modify it, but you've got to think about the inevitable slack-jawed yokel maintenance programmer that will follow you. Three years hence, Cletus is going to bollix things up bad because he can modify it.
It's like the story (probably apocryphal; I want to say I heard it back in college in a compilers class) of the early Fortran compiler that allowed constants on the left hand side of an assignment to be modified, changing the value in the constant pool (I think it was on an architecture that didn't allow immediate values; everything had to be loaded to registers from RAM, so even things like "1" and "4.20" were sitting somewhere in memory). Sure nobody will be silly enough to intentionally set 3 = 2, but accidents can happen (c.f. Murphy) and then someone has real fun tracking down where the really large values of 1 and 1 are coming from when suddenly 1 + 1 EQ 3 is true.
|