Heya ppl!
I've written a simple Compile Time (syntatic sugar mostly) and Run Time
reflection library for methods only.
It's not complete yet. I could not deal with certain issues in Run Time, such
as ref/out function arguments, variadic function arguments. But it's mostly
done.
The problems are commented in the code.
Naming conventions are bad and it is not properly modularized yet.
I would welcome any input and I offer cooperation if you guys want to make a
real time reflection library on phobos, or if anyone wants to make a more
complete library, better structured library.
In the meantime, I'll keep working on this.
Best regards,
Daniel

Heya ppl!
I've written a simple Compile Time (syntatic sugar mostly) and Run Tim=

e =

reflection library for methods only.
It's not complete yet. I could not deal with certain issues in Run Tim=

e, =

such as ref/out function arguments, variadic function arguments. But =

it's mostly done.
The problems are commented in the code.
Naming conventions are bad and it is not properly modularized yet.
I would welcome any input and I offer cooperation if you guys want to =

=

make a real time reflection library on phobos, or if anyone wants to =

make a more complete library, better structured library.
In the meantime, I'll keep working on this.
Best regards,
Daniel

Great, i think if the metaobject disguise in a way acting exactly as the=
=
original object it would be great. For example:
auto dmo =3D new reflect.MetaObject!Foo( foo );
Foo p =3D dmo;
I think this runtime reflection could be integrated into object.d
not every object necessarily become runtime reflexible. Just the base =
object class provides a flag indicating if this object is actually a =
runtime reflexible object. No other interface function would be added to=
=
object which would bloat every object in D. The flag maybe extended for =
=
other use as well. I know even adding a flag people would argue.
Next is providing a template function which is able to cast an object =
which casted from MetaObject to the real object itself. I think it will =
be =
better if the MetaObject!Foo actually derives Foo. Thus the cast could b=
e =
made easily. Then there's no barrier of passing a runtime reflexible =
object to a library as it's a compiletime determined object, and deal wi=
th =
it as a runtime reflexible object again later.
We may also want to treat every runtime reflexible object as one categor=
y =
object which wouldn't work if the MetaObject derives different classes. =
=
One possible solution is to make the MetaObject derives from the target =
=
object type and also implements the general runtime reflexible interface=
. =
We can manipulate all runtime reflexible object through a standardized =
runtime reflexible interface. We can also cast those objects back toward=
s =
compiletime-determined object easily.
David L.
-- =
=CA=B9=D3=C3 Opera =B8=EF=C3=FC=D0=D4=B5=C4=B5=E7=D7=D3=D3=CA=BC=FE=BF=CD=
=BB=A7=B3=CC=D0=F2: http://www.opera.com/mail/