digitalmars.D - Status of ClassInfo.getMembers / TypeInfo_Struct.xgetMembers
- Daniel Keep (10/35) Apr 16 2009 Are these methods going to be implemented any time soon? I just
- Christopher Wright (6/9) Apr 16 2009 No. They've been there time out of mind and are still not implemented.
Are these methods going to be implemented any time soon? I just stumbled across these are practically jumped for joy at what they'd allow me to do. I mean, they return an array of these:abstract class MemberInfo { string name(); } class MemberInfo_field : MemberInfo { this(string name, TypeInfo ti, size_t offset); override string name(); TypeInfo typeInfo(); size_t offset(); } class MemberInfo_function : MemberInfo { enum { Virtual = 1, Member = 2, Static = 4, } this(string name, TypeInfo ti, void* fp, uint flags); override string name(); TypeInfo typeInfo(); void* fp(); uint flags(); }I could do full runtime (de)serialisation with these. Hell, a little runtime codegen magic and I could embed an interpreter that doesn't need shims to be specified at compile-time. Then I discovered that they don't actually do anything. Please tell me this is just taking time and isn't going to be dropped. *puppy dog eyes* -- Daniel
Apr 16 2009
Daniel Keep wrote:Are these methods going to be implemented any time soon? I just stumbled across these are practically jumped for joy at what they'd allow me to do. I mean, they return an array of these:No. They've been there time out of mind and are still not implemented. They would be so miraculously wonderful if they existed, and here I am, writing TypeInfoEx. Granted, it's an order of magnitude easier to work with __traits than with the compiler.
Apr 16 2009