Hmm - about manifest/enum

Walter Bright newshound1 at digitalmars.com
Sat Dec 29 17:40:37 PST 2007


Derek Parnell wrote:
> My problems with D2 revolve around the syntax you have chosen for us, and
> the omissions in the 'const' paradigm

I'm not sure what omissions you mean. The const scheme is pretty 
thorough end-to-end.

> you have decided are acceptable for
> us. Both of those, I foresee, will add to the cost of maintenance.

It's difficult to tell what is right without using it for a while.

> The D programming language already has too many over-used keywords and
> poorly chosen keywords.

Some have also argued that it has too many keywords, period.

> The current decision to reuse 'enum' for manifest constants is yet another
> example of a designer believing that their intuition is better than their
> customers', regardless of any evidence to the contrary. Please reconsider
> that there might be a remote possibility that this decision is actually
> wrong in this case; 'enum' is not the best choice for developers when it
> comes to declaring manifest constants.

There are a number of people who strongly feel it is the correct 
decision who are not vocal about it.

> And yes, after using it for awhile we will get used to it, but that is not
> a reason for having it in the first place. We can get accustomed to the
> wart on our partners' nose but it will always be a wart.
> 
> The arguments to date for 'enum' boil down to (1) its easier to implement
> given the current state of the D compiler,

Actually it's easier to invent another keyword.

> (2) C++ sort of, kind of, uses it sometimes like that, and

I brought up the C++ thing in the context of showing that enum is 
already routinely used for similar things.

> (3) you think its better than anything else.

That's not really an argument as to why I think it's the best option <g>.

> Could it be that your point of view is not always the same as the
> developers' trying to use D?

All I can say is try using it for a while. Give it a chance, and then 
see what you think. I initially got criticized a lot for using !( ) for 
templates rather than < >, but I think that time has shown it was a good 
decision.



More information about the Digitalmars-d mailing list