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

Maxim Fomin maxim at maxim-fomin.ru
Sun Nov 24 05:57:21 PST 2013


On Sunday, 24 November 2013 at 13:49:25 UTC, ilya-stromberg wrote:
>
> So, pointer implicitly converts to false if pointer is null and 
> to true if pointer is not null. Is it bug or terrible feature? 
> Note that we have `f is null` syntax for these cases.

This is neither bug not a terribale feature. Have you coded in C?


More information about the Digitalmars-d mailing list