April 17, 2009 Status of ClassInfo.getMembers / TypeInfo_Struct.xgetMembers | ||||
|---|---|---|---|---|
| ||||
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
| ||||
April 17, 2009 Re: Status of ClassInfo.getMembers / TypeInfo_Struct.xgetMembers | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Daniel Keep | 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.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply