DIP 1015--removal of implicit conversion from integer and character literals to bool--Community Review Round 1
Francesco Mecca
me at francescomecca.eu
Thu Jun 21 18:56:39 UTC 2018
On Thursday, 21 June 2018 at 17:11:07 UTC, Steven Schveighoffer
wrote:
> On 6/20/18 4:16 AM, Mike Parker wrote:
>> [...]
>
> I agree with everything, but one thing that is not specified
> here is when integers are used as conditionals.
>
> In other words, this still has to compile:
>
> if(1) ...
>
> enum a = 1;
>
> if(a) ...
>
> I can see this somehow getting caught up in the "implicit
> conversion to bool", so there should be a section to address
> this.
>
> -Steve
I agree and after reading the DIP I am still confused if we are
allowed to write while(1) (and similar conditionals) anymore.
More information about the Digitalmars-d
mailing list