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

Walter Bright newshound2 at digitalmars.com
Mon Nov 25 23:19:53 PST 2013


On 11/25/2013 4:05 PM, Andrei Alexandrescu wrote:
> On 11/25/13 1:39 AM, ilya-stromberg wrote:
>> I personally like Craig Dillabaugh's sugestion. But we can use `.`
>> operator for this because it alredy used for call global functions and,
>> probably, should break nothing. Like this:
>>
>> int my_gobal_var;
>>
>> .my_global_var = 7;
>>
>> Is it possible?
>
> Doesn't that work already?

Sure, but only because I saw the suggestion and traveled back in time to 
implement it!



More information about the Digitalmars-d mailing list