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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Nov 26 08:27:27 PST 2013


On 11/26/13 2:43 AM, ilya-stromberg wrote:
> On Tuesday, 26 November 2013 at 09:25:56 UTC, bearophile wrote:
>> While a lint is useful for some purposes (like verifying the D code
>> doesn't have logically wrong indentations), there are some things that
>> are probably better addressed in the language.
>
> So, we have a few suggestions in this thread like:
> 1) disable shadowing class members
> 2) disable shadowing global variables
> 3) enforce using `.` before global variables
>
> What our next step? Shall we add Bugzilla issue or something else?

Maybe (2) has something going for it, but (1) and (3) are definite 
no-nos. The win of (2) itself is yet to be quantified and the breakage 
is large. So my suggestion is we choose:

4) Do absolutely nothing and move on.


Thanks,

Andrei



More information about the Digitalmars-d mailing list