DMD 0.174 release
Jarrett Billingsley
kb3ctd2 at yahoo.com
Wed Nov 15 06:45:55 PST 2006
"Knud Sørensen" <12tkvvb02 at sneakemail.com> wrote in message
news:pan.2006.11.15.11.31.12.751698 at sneakemail.com...
> On Wed, 15 Nov 2006 00:21:30 -0800, Walter Bright wrote:
>
>> Hasan Aljudy wrote:
>>> I'm not much of a template guy .. good job, I guess, even though it all
>>> sounds like C++ish bloat to me.
>>> But isn't Reflection more important? :P
>>
>> Tuples are a form of compile time reflection.
>
> How do you convert a class or a struct to a tuple ???
With .tupleof!
class A { int x; float y; }
A a = new A();
a.tupleof[0] = 4;
a.tupleof[1] = 3.14;
I think you can do it on the class type itself as well. This only works for
the datafields though.
More information about the Digitalmars-d-announce
mailing list