equivariant functions
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Wed Oct 15 03:19:36 PDT 2008
Andrei Alexandrescu wrote:
> Benji Smith wrote:
>> Andrei Alexandrescu wrote:
>>> What do you think? I'm almost afraid to post this.
>>
>> It's a lot to swallow all at once, especially if the equivariance
>> applies to all type/subtype relationships, and not just the mutability
>> of a value. Am I reading that right?
>
>
> Yes.
Are you sure about that? How would this work for interfaces and classes
that implement them?
Remember: Interface references currently don't point to the object
vtable at the beginning of an object but to the interface vptr inside
the object.
Unless that was changed/is going to change? (For example, interface
references could be implemented as "fat pointers" consisting of { object
ptr, interface vptr } instead of the current { pointer to interface vptr
}, which could make this easier to implement)
More information about the Digitalmars-d
mailing list