Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread Neia Neutuladh via Digitalmars-d-announce
On Wed, 14 Nov 2018 13:40:46 -0500, Steven Schveighoffer wrote: > You don't think this is confusing? > > enum A : int { > val > } > > A a; > foo(a); // error: be more specific > int x = a; > foo(x); // Sure I find this confusing: void foo(int i) {} void foo(ubyte b) {} enum A

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread Rubn via Digitalmars-d-announce
On Wednesday, 14 November 2018 at 02:45:38 UTC, Walter Bright wrote: On 11/13/2018 3:29 PM, Rubn wrote: > enum A : int { a = 127 } `a` is a manifest constant of type `A` with a value of `127`. Remember that `A` is not an `int`. It is implicitly convertible to an integer type that its value

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Nov 14, 2018 at 06:59:30PM +, Carl Sturtivant via Digitalmars-d-announce wrote: > On Monday, 12 November 2018 at 10:05:09 UTC, Jonathan M Davis wrote: > > *sigh* Well, I guess that's the core issue right there. A lot of us > > would strongly disagree with the idea that bool is an

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread 12345swordy via Digitalmars-d-announce
On Wednesday, 14 November 2018 at 18:11:59 UTC, Neia Neutuladh wrote: On Tue, 13 Nov 2018 20:27:05 -0800, Walter Bright wrote: There have been various attempts over the years to "fix" various things in the D matching system by adding "just one more" match level. I kind of feel like, if

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread Carl Sturtivant via Digitalmars-d-announce
On Monday, 12 November 2018 at 10:05:09 UTC, Jonathan M Davis wrote: *sigh* Well, I guess that's the core issue right there. A lot of us would strongly disagree with the idea that bool is an integral type and consider code that treats it as such as inviting bugs. We _want_ bool to be

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread Steven Schveighoffer via Digitalmars-d-announce
On 11/14/18 1:11 PM, Neia Neutuladh wrote: On Tue, 13 Nov 2018 20:27:05 -0800, Walter Bright wrote: There have been various attempts over the years to "fix" various things in the D matching system by adding "just one more" match level. I kind of feel like, if something would be confusing like

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread Neia Neutuladh via Digitalmars-d-announce
On Tue, 13 Nov 2018 20:27:05 -0800, Walter Bright wrote: > There have been various attempts over the years to "fix" various things > in the D matching system by adding "just one more" match level. I kind of feel like, if something would be confusing like this, maybe the compiler shouldn't be

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread Neia Neutuladh via Digitalmars-d-announce
On Wed, 14 Nov 2018 12:09:33 +0100, Jacob Carlborg wrote: > What is ": int" doing, only specifying the size? It specifies the type to match for overloading when the compiler isn't required by the language to constant-fold the value.

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-14 Thread Jacob Carlborg via Digitalmars-d-announce
On 2018-11-14 03:45, Walter Bright wrote: On 11/13/2018 3:29 PM, Rubn wrote: enum : int { a = 127 } To reiterate, this does not create an anonymous enum type. 'a' is typed as 'int'. Technically, `a` is a manifest constant of type `int` with a value of `127`. > enum A : int { a = 127 } `a`

Re: Profiling DMD's Compilation Time with dmdprof

2018-11-14 Thread Vladimir Panteleev via Digitalmars-d-announce
On Thursday, 8 November 2018 at 07:54:56 UTC, Manu wrote: And all builds are release builds... what good is a debug build? DMD is unbelievably slow in debug. If it wasn't already slow enough... if I try and build with a debug build, it takes closer to 5 minutes. I just got to try a