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: int/longRe: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-16 Thread Neia Neutuladh via Digitalmars-d
On Sunday, 16 September 2018 at 17:33:27 UTC, Steven Schveighoffer wrote: As precedent, we do have -transition=intpromote, which disables the requirement for casting smaller integers to int first. And -dip1000. Maybe it would be nice to have a generic -future=[changeid] flag. I'd like it if

Re: int/longRe: 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 8:36 PM, Nicholas Wilson wrote: Without it, I get a (possibly quite a lot of) deprecation warnings and I have to insert a cast to the corresponding type, e.g. f(cast(int)E.a)/g(cast(long)(a - b)), to verify the behaviour under the new system and silence the deprecation warning

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: int/longRe: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-15 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 16 September 2018 at 01:47:33 UTC, Mike Franklin wrote: On Friday, 14 September 2018 at 23:08:34 UTC, Nicholas Wilson The only thing I think is missing is a flag to accelerate the process s.t. the examples f(E.a); f(E.b); g(a - b); can be made to call their int/long overloads

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

2018-09-15 Thread Mike Franklin via Digitalmars-d
On Friday, 14 September 2018 at 23:08:34 UTC, Nicholas Wilson wrote: On Friday, 14 September 2018 at 13:41:40 UTC, 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

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

int/longRe: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-14 Thread Nicholas Wilson via Digitalmars-d
On Friday, 14 September 2018 at 13:41:40 UTC, 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

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

2018-09-14 Thread Mike Parker via Digitalmars-d-announce
The last chance for community feedback on DIP 1015, "Deprecation and removal of implicit conversion from integer and character literals to bool", is now underway. Please do not leave any feedback in this thread, but rather in the review thread in the General forum:

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

2018-09-14 Thread Mike Parker via Digitalmars-d
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