Implicit delegate conversions

2011-01-15 Thread Tomek Sowiński
The profusion of D's attributes has made delegate signature mismatches all too likely thus one must resort to casts too often with e.g. callbacks. const(short)[] delegate(immutable(int)*) dg1; immutable(short)[] delegate(const(int)*) pure nothrow @safe dg2; dg1 = dg2; // fails (if *any* of stora

Re: Implicit delegate conversions

2011-01-15 Thread Steven Schveighoffer
On Sat, 15 Jan 2011 06:37:48 -0500, Tomek Sowiński wrote: The profusion of D's attributes has made delegate signature mismatches all too likely thus one must resort to casts too often with e.g. callbacks. const(short)[] delegate(immutable(int)*) dg1; immutable(short)[] delegate(const(int)*

Re: Implicit delegate conversions

2011-01-17 Thread Tomek Sowiński
Steven Schveighoffer napisał: > I think this is one place where D can improve by vast amounts without a > lot of effort (no change in code generation, just in implicit casting). Yeah, my thoughts exactly. And bumping into a signature mismatch has gotten really likely. > I've brought this u

Re: Implicit delegate conversions

2011-01-19 Thread Steven Schveighoffer
On Mon, 17 Jan 2011 14:39:02 -0500, Tomek Sowiński wrote: Steven Schveighoffer napisał: I think this is one place where D can improve by vast amounts without a lot of effort (no change in code generation, just in implicit casting). Yeah, my thoughts exactly. And bumping into a signature mis