Updating D beyond Unicode 2.0

Shachar Shemesh shachar at weka.io
Wed Sep 26 07:37:28 UTC 2018


On 26/09/18 10:26, Dukc wrote:
> On Wednesday, 26 September 2018 at 06:50:47 UTC, Shachar Shemesh wrote:
>> The properties that cause city names to be poor candidates for enum 
>> values are the same as those that make them Unicode candidates.
> 
> How so?
> 
>> City names (data, changes over time) as enums (compile time set) seem 
>> like a horrible idea.
> 
> In most cases yes. But not always. You might me doing some sort of game 
> where certain cities are a central concept, not just data with 
> properties. Another possibility is that you're using code as data, AKA 
> scripting.
> 
> And who says anyway you can't make a program that's designed 
> specificially for certain cities?

Sure you can. It's just very poor design.

I think, when asking such questions, two types of answers are relevant. 
One is hypotheticals where you say "this design requires this". For such 
answers, the design needs to be a good one. It makes no sense to design 
a language to support a hypothetical design which is not a good one.

The other type of answer is "it's being done in the real world". If it's 
in active use in the real world, it might make sense to support it, even 
if we can agree that the design is not optimal.

Since your answer is hypothetical, I think arguing this is not a good 
way to code is a valid one.

Shachar


More information about the Digitalmars-d mailing list