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

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sun Sep 16 00:55:34 UTC 2018


On Saturday, September 15, 2018 2:07:06 PM MDT Steven Schveighoffer via 
Digitalmars-d wrote:
> On 9/14/18 6:41 AM, Mike Parker wrote:
> > DIP 1015, "Deprecation and removal of implicit conversion from integer
> > and character literals to bool", is now ready for Final Review. This is
> > a last chance for community feedback before the DIP is handed off to
> > Walter and Andrei for the Formal Assessment. Please read the procedures
> > document for details on what is expected in this review stage:
> >
> > https://github.com/dlang/DIPs/blob/master/PROCEDURE.md#final-review
> >
> > The current revision of the DIP for this review is located here:
> >
> > https://github.com/dlang/DIPs/blob/299f81c2352fae4c7fa097de71308d773dcd9
> > d01/DIPs/DIP1015.md
> >
> >
> > In it you'll find a link to and summary of the previous review round.
> > This round of review will continue until 11:59 pm ET on September 28
> > unless I call it off before then.
> >
> > Thanks in advance for your participation.
>
> 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.

It would be a serious problem for enums of type bool to change like, and
there should be no need for it.

- Jonathan M Davis





More information about the Digitalmars-d mailing list