DIP 1015--removal of integer & character literal conversion to bool--Final Review

Mike Franklin slavo5150 at yahoo.com
Sun Sep 16 01:29:38 UTC 2018


On Saturday, 15 September 2018 at 20:07:06 UTC, Steven 
Schveighoffer wrote:

> Looks pretty good to me. The only question I have is on this 
> part:
>
> enum YesNo : bool { no, yes } // Existing implementation: OK
>                               // After stage 1: Deprecation 
> warning
>                               // After stage 2: Error
>                               // Remedy: `enum YesNo : bool { 
> no = false, yes = true }`
>
> Why is this necessary? I can't see how there are integer 
> literals being used here, or how implicitly going from `false` 
> to `true` in the 2 items being enumerated is going to be 
> confusing.

You're right, I just tested the implementation, and this is not 
necessary.  I'll remove it.  Thanks!

Mike




More information about the Digitalmars-d mailing list