More Intuitive Syntax for Manifest (enum) Constants

Peter C peterc at gmail.com
Tue Nov 25 10:22:54 UTC 2025


On Tuesday, 25 November 2025 at 10:10:35 UTC, Serg Gini wrote:
> On Tuesday, 25 November 2025 at 09:56:48 UTC, Peter C wrote:
>> In D, I wasn't aware you could do that for 'a single' manifest 
>> constant:
>
> Am I understood it right, that you made some suggestions 
> regarding language changes without knowing the language itself?

I did not open this conversation.

And if you read my posts correctly, I was very explicit about 
*not* advocating for a change.

I was just putting forth my reasoning as to why I thought, that 
the tool for defining a type should not be the tool for defining 
a value.

In C#, I get a guaranteed compile time constant doing:

public const double VAL = 0.2;

I find that semantically more cleaner than using an enum type.

That is really all I'm saying. Agree or disagree.. I couldn't 
give a flying %$ff ;-)


More information about the Digitalmars-d mailing list