Anonymous function syntax

Walter Bright newshound2 at digitalmars.com
Thu Sep 22 14:46:13 PDT 2011


On 9/22/2011 1:13 PM, Jacob Carlborg wrote:
> I function/delegate that returns a value should be implicitly converted to a
> function/delegate that returns void.


That doesn't work in some cases - consider a function that returns an object 
that the caller must destruct. Or even just returns a struct - the caller passes 
in a hidden pointer to where the return type gets written.

Implicit conversion of function pointers and delegates requires binary ABI 
compatibility.


More information about the Digitalmars-d mailing list