More Intuitive Syntax for Manifest (enum) Constants

Peter C peterc at gmail.com
Mon Nov 24 22:22:12 UTC 2025


On Monday, 24 November 2025 at 15:46:28 UTC, Kagamin wrote:
>
> ... the poster you reply to is known to have outlandish 
> reasoning.

"Outlandish reasoning" -> a line of thinking or an explanation 
that is extremely strange, unusual, bizarre, or improbable.

Mmm. You really think my reasoning is that?

You may well disagree with: @const int SIZE = 5;

But there is nothing outlandish about that, surely.

It's effectively a C++ constexpr.

Sure, in C++, you could also do:

enum { SIZE = 5 };

But constexpr is best practice I believe.

Again, I'm not arguing for a change here (i.e if you use [ enum 
SZ = 10; ] often enough, you'll quickly adapt to accepting it), 
but I have to push back on your claim that my preference to not 
use [ enum SZ = 10; ] is somehow based on outlandish reasoning. 
That just sounds like a slur to me.



More information about the Digitalmars-d mailing list