Hmm - about manifest/enum

Lars Ivar Igesund larsivar at igesund.net
Tue Jan 1 08:20:31 PST 2008


Walter Bright wrote:
> 
>> 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.

It is hard to try to be involved (in any capacity) with D language evolution
when there are silent (or rather non-public) opinions that weighs more than
this newsgroup, and I think as people on the newsgroup figures this out, it
will be a loss for D.

In earlier situations that are similar to this one, it has always looked
like the unvocal persons are C++-users, thus we end up in a very C++
inspired language when that often is definately not what we want.

If one were to have a "panel" of experienced users, one should strive to
have one with equally much experience in the various big languages (too bad
that it is hard finding anyone with 10+ years in Java and 5+ in C#). As it
is now, the overweight of C++ seems to be too big (from the outside), which
sounds doubly bad considering D is touted as a language fixing C++
mistakes. Most C++-users I know refuse to even acknowledge that C++ is bad.

>> (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.

The problem with this argument is that it appears that this is a
typical "feature" of C++ that D should claim to fix. Instead it is copied,
bringing a seemingly bad convention into D. There is plenty of opportunity
to fix this upfront, and it is not taken. 
 
>> 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.

It is hard to know, but I believe that by gouging the opinions in the
newsgroup and in the IRC channels, you'll get a rather representative set,
and if that is the case, the majority does not want enum, but rather
manifest (or pure as Don suggested some time ago).

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list