On Tue, Jan 14, 2014 at 7:15 AM, Jonathan S. Shapiro <[email protected]>wrote:

> On Sun, Jan 12, 2014 at 10:40 PM, Ben Kloosterman <[email protected]>wrote:
>
>> Thanks WIlliam
>>
>> On Mon, Jan 13, 2014 at 3:50 PM, William ML Leslie <
>> [email protected]> wrote:
>>
>>> Interfaces never really want to live on the heap.  If implemented as
>>>
>>  pairs of (this ref, vtable ref), it's cheaper to pass this around as a
>>> well-typed unboxed value than to stick it in the heap where it needs
>>> metadata to describe its allocation, as well as possibly a header for
>>> RTTI.
>>>
>>
>> Im thinking about GP programming with many objects in the heap having
>> members that are interfaces and these are very long lived and its very
>> common.  So instead of create on heap  , we create on stack and copy to
>> heap in each case.
>>
>
>  The only way that the interface object itself ends up in the heap is if
> it is contained by an object having reference type.
>

Which is by far the most common case for GP programming .

Ben
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to