In general, you should prefer constants over variables. You’ll find that more often than not you want a handy name for some piece of data, but you don’t need its value to change. The advantage of using constants is that it makes it harder to accidentally change the value of something that shouldn’t be changed. For example, if you’re working on a part of your program that performs some kind of action on a user, you might have a variable called
user. If you’re dealing with only one user, it would probably indicate an error in your code if the value of
user changed. If you were working with two users, you might call them
user2, instead of sim...
당신이 어떤 자료를 추상적으로 지정하는 것이 아니라면, 일반적으로 상수(Constants) Type을 권장하며, 변화되는 값을 지정하는 것이라면 이 Type은 사용을 권하지 않습니다.