Implicit enum conversions are a stupid PITA

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Mar 25 18:47:52 PDT 2010


On 03/25/2010 08:10 PM, Nick Sabalausky wrote:
> "Walter Bright"<newshound1 at digitalmars.com>  wrote in message
> news:hogsv9$11u7$1 at digitalmars.com...
>> The only choice is to support 0177 as octal or make it a syntax error. I'd
>> rather support them.
>
> Supporting it means it will "silently and disastrously break code" from
> anyone who tries to use a leading zero and *isn't* a C guru, and very few
> people these days are (I used C for years without being aware of that octal
> syntax - it's only by dumb luck I didn't try to use a leading zero).
> Granted, it may not be common for someone to try to use leading zeroes, but
> it's a landmine I'd rather not have, even if it is down a less-travelled
> sidestreet, expecially considering it's all for such a trivial benefit
> (which amounts to what, one person who just thinks it looks pretty?)

That kind of destroys Walter's argument.

Andrei




More information about the Digitalmars-d mailing list