Manifest constants (was const again)

Bill Baxter dnewsgroup at billbaxter.com
Sat Dec 8 21:24:47 PST 2007


Walter Bright wrote:
> John Reimer wrote:
>> Walter Bright wrote:
>>> John Reimer wrote:
>>>> May I ask what Andrei Alexandrescu's opinion is of using 'enum' as 
>>>> manifest const?  Seems to me that this choice wouldn't pass 
>>>> unnoticed by him, and I know he has some small influence on D. :-)
>>>
>>> He immediately liked it. So the condemnation of enum isn't quite as 
>>> universal as one might suspect reading these threads <g>.
>>
>>
>> Yep, that's what I was wondering.  It seemed that there might have 
>> been some support coming elsewhere. :-)
> 
> I didn't mention it before because appeal to authority is a logical 
> fallacy, the idea should succeed or fail on its own merits.

Yeh, I think it was right not to mention it.  I wanted to see if it 
would stand or fail on its own merits too.  And from my perspective it 
pretty much failed on the merits, but I'm willing to live with it given 
the authority of *two* independent experts (Walter and Andrei).

The second reason to "let it be" is more or less what John Reimer said. 
  I've made all the arguments I had against it, and it didn't convince 
Walter, so ... c'est la vie.  It's just a programming language, and 
fortunately I'm pretty much free to move on to the next one if D 
accumulates too many design choices that I disagree with.  Whereas 
Walter is pretty much stuck with whatever he creates.  So if he thinks 
it's the right choice, then fine.   He's the one implementing it.  If 
he's wrong then he'll be the one sitting all alone wondering what 
happened to all the users of that promising new programming language he 
poured so many years of his life into.  It's actually quite a daunting 
prospect, and I have a lot of respect for someone who can go all out 
like that.

Third, I learned my lesson with foreach_reverse.  Arguing with logic 
doesn't help.  :-)  And by the way, Andrei agreed that that one was 
ill-conceived, so that's part of why I respect his opinion on such 
matters now.  I know he doesn't lightly tolerate ugliness in a language.
(http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=50835).

--bb



More information about the Digitalmars-d mailing list