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

2018-09-16 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 16 September 2018 at 23:59:18 UTC, aliak wrote: What about: enum E: bool { no, yes } void main() { E e = cast(E)(0); } Would be illegal I assume? You have an explicit cast, so no, it would be fine.

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

2018-09-16 Thread aliak via Digitalmars-d
On Sunday, 16 September 2018 at 01:29:38 UTC, Mike Franklin wrote: 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

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

2018-09-16 Thread Steven Schveighoffer via Digitalmars-d
On 9/15/18 6:29 PM, Mike Franklin wrote: 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:

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

2018-09-15 Thread Mike Franklin via Digitalmars-d
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

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

2018-09-15 Thread Jonathan M Davis via Digitalmars-d
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

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

2018-09-15 Thread Steven Schveighoffer via Digitalmars-d
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