More Intuitive Syntax for Manifest (enum) Constants
Zealot
zealot at planet.earth
Tue Nov 25 15:26:06 UTC 2025
On Tuesday, 25 November 2025 at 12:20:13 UTC, Dejan Lekic wrote:
> On Tuesday, 25 November 2025 at 10:54:06 UTC, Jonathan M Davis
> wrote:
>> [...]
>
> I thought I would skip this discussion, but I could not resist
> to write my suggestion here. We discussed `final int E = 42`,
> `manifest E = 42`, and few other options on but I do not
> remember that we discussed this:
>
> ```d
> named E = 42;
> named APP_VERSION = "1.0.0";
> ```
>
> This comes from the fact that manifest constants are "named",
> "literal", "symbolic" constants. A good alternative in my
> opinion would be `symbol E = 42;`
alias? :D
More information about the Digitalmars-d
mailing list