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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Nov 24 20:35:10 PST 2013


On 11/24/13 8:27 PM, Craig Dillabaugh wrote:
> Would it be possible to introduce a global scope of sorts that
> had to be explicitly referenced when one wanted to define or use
> a global variable. I haven't thought of how this might interface
> with other D features, but something along the lines of:
>
> @global int my_gobal_var; //Gets added to global scope.
>
> //Then any globals would have to be referenced as:
> global.my_global_var = 7;
>
> Makes for a bit of extra typing, and would mess with any module
> named 'global', but it might work?

To put it bluntly, many things are possible but it seems the best is to 
do nothing here. We're in good shape.

Andrei



More information about the Digitalmars-d mailing list