Implicit enum conversions are a stupid PITA

Walter Bright newshound1 at digitalmars.com
Thu Mar 25 20:49:06 PDT 2010


Nick Sabalausky wrote:
> (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). 

It is on the 3rd page of chapter 2 in K&R (and chapter 2 is the first chapter of 
the specification).

A mitigating factor is who uses leading 0's for integer literals? Another is if 
you started using leading 0's, very quickly you'd try using the digits 8 or 9, 
and would get an error.

I don't think you'd get very far using leading 0's without discovering the issue.



More information about the Digitalmars-d mailing list