DMD can implicitly convert class pointer to the bool. Is it bug or terrible feature?

Walter Bright newshound2 at digitalmars.com
Sun Nov 24 19:59:49 PST 2013


On 11/24/2013 7:49 AM, Maxim Fomin wrote:
> Yes, it is confusing. It is especially confusing in an unstable language with
> absent adequate spec. For example, I can learn C namespace rules, but in D case
> it is useless. Unfortunately what is right in cases like above depends on what
> Walter & Andrei think so we stuck with their opinions on the subject.

In what way are D namespace rules unclear? Please file bugzilla reports for any 
such, and mark them with the keyword 'spec'.


> (I think emitting at least warning would be good)

I don't think there should be errors for shadowing globals for very good 
reasons, warnings are a generally bad solution to language issues, and changing 
the way scoping rules work would be the very definition of instability.


More information about the Digitalmars-d mailing list