On 25/09/18 15:35, Dukc wrote:
Another reason is that something may not have a good translation to English. If there is an enum type listing city names, it is IMO better to write them as normal, using Unicode. CityName.seinäjoki, not CityName.seinaejoki.

This sounded like a very compelling example, until I gave it a second thought. I now fail to see how this example translates to a real-life scenario.

City names (data, changes over time) as enums (compile time set) seem like a horrible idea.

That may sound like a very technical objection to an otherwise valid point, but it really think that's not the case. The properties that cause city names to be poor candidates for enum values are the same as those that make them Unicode candidates.

Shachar

Reply via email to