That's a very vague title but I couldn't think of a better way to word it. But, just as an example, think about the direction that a character in a game is moving in. It just feels kind of wrong to be using a string and then doing things like if(character.direction == left). It seems to me that it leaves too much room for silly errors, like accidentally using Left or l or whatever instead of left. Are my suspicions correct? If so, what's the preferred way of achieving something like this?
Is it bad practice to store certain values as strings?
programming practices;strings