[cfe-dev] Reflection
John McCall
rjmccall at apple.com
Tue Dec 14 13:04:53 PST 2010
On Dec 14, 2010, at 11:44 AM, Russell Harmon wrote:
> On Dec 14, 2010, at 14:10, David Chisnall <csdavec at swan.ac.uk> wrote:
>
>> On 14 Dec 2010, at 15:27, Russell Harmon wrote:
>>
>>> I didn't really think it mattered since C++ is (mostly) just a
>>> superset of C, but I had actually intended to do this for C, not C++.
>>
>>
>> From an Objective-C perspective, it would be very interesting if C structures and functions could have their types registered with the runtime. This would probably add a lot of overhead for types - unlike Objective-C classes, they don't have a single location with an authoritative definition, but for functions it would be relatively cheap.
> What? The struct definition doesn't provide an authoritative definition?
David's saying that there isn't a unique translation unit responsible for defining the struct. This is true even in C++, unless the class in question has a key function.
John.
More information about the cfe-dev
mailing list