On 09/22/2011 11:46 PM, Walter Bright wrote:
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.

The compiler could insert a thunk that discards the result if the two delegate types are not ABI compatible.

Reply via email to