Manifest constants (was const again)

Derek Parnell derek at psych.ward
Sat Dec 8 01:58:52 PST 2007


On Sat, 08 Dec 2007 01:01:27 -0800, Walter Bright wrote:

> With the enum case, I doubt it would take more than a moment for someone 
> to figure out what it was, and it is not confusingly similar to 
> something else. Once one knows what it is, one might take a moment to 
> ridicule the choice of keyword, but that's about it before getting past 
> it and it becoming just more D jargon like static, class, and real.

True and sad. Another opportunity to "do the right thing" missed.

WILL THE NEW ENUM BE ALLOWED TO GROUP MANIFEST CONSTANTS TOGETHER?

WILL THE NEW ENUM INFER THE TYPE FROM ITS LITERAL?

WILL THE NEW ENUM BE ABLE TO USE CTFE?

(I only shout this time because these questions keep being ignored by
Walter).

For example ...
enum
{
   defname = "upload.log",
   float fudge = 61.74,
   char starter = 'r',
   qwerty = 0xF4,
   foobar = SomeFunc("foobar")  
}


-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d mailing list