Implicit enum conversions are a stupid PITA

Walter Bright newshound1 at digitalmars.com
Thu Mar 25 16:52:11 PDT 2010


Andrei Alexandrescu wrote:
> On 03/25/2010 06:11 PM, Walter Bright wrote:
>> Andrei Alexandrescu wrote:
>>> Then you'll be happy to start using octal as soon as I commit it.
>>
>> Haven't changed my mind about that, nor the reasons!
> 
> Haven't seen you posting the results of the grep. As "reason" has the
> same root as "reasoning", there must be some of it aside from just
> subjective preference. As such, there must be some way you could respond 
> to this:
> 
>> druntime has 152 octal constants for a total of 53130 lines.

That's a lot more than I expected.

And yes, there are reasons to have octal constants, and reasons not to. D will 
survive with or without them. In the end, it's a subjective call, dare I say a 
matter of 'taste'?

I admit it, I just like octal constants. I like the way they look. I don't feel 
an urge to kill it with fire. I'd be sad to see them go. I like disco music, 
too, despite it being definitely out of style.

One thing is clear, though. 0177 is never going to be a decimal number in D, 
because it will silently and disastrously break code translated from C. The only 
choice is to support 0177 as octal or make it a syntax error. I'd rather support 
them.



More information about the Digitalmars-d mailing list