D - ClassInfo question.
- Evan McClanahan (42/42) Dec 05 2002 Is the .classinfo property not implemented or partially implemented at
- Walter (5/47) Dec 14 2002 ClassInfo will eventually be expanded to support complete information ab...
- Evan McClanahan (7/10) Dec 15 2002 So, something like a list of all of the types of the classes? That's
- Walter (6/12) Dec 15 2002 A list of all the members, offsets, and types.
- Evan McClanahan (8/27) Dec 16 2002 I'd offer to help professionally (HAH!) this coming summer, but I don't
- Walter (4/10) Dec 16 2002 Thanks. Just for perspective, ask some other compiler vendors how many
Is the .classinfo property not implemented or partially implemented at this point? It seems that it provides no useful information right now. Since there isn't any documentation on it, I don't know that I'm using it correctly. below is the test program that I wrote to take a look at it, but all that it outputs is: 4 Object 004140A0 4 4 Object 008A2EE0 which isn't amazingly helpful, since print()'ing a class object seems to do very little, honestly. (I'm assuming that the number is a pointer or reference to some static value for the class? What state is classinfo at? What are your goals for it? I can think of some useful things to do with it, but in it's current, undocumented state, it seems like more of a placeholder. Please let me know if I'm missing something. Evan //////////////////////////////////////////////////////////////// class TestClass { private: int testInt; TestClass* next, parent; public: int GetTestInt() { return testInt; } } int main (char[][] args) { TestClass test = new TestClass; ClassInfo ci = TestClass.classinfo; printf("%d\n", ci.size); ci.print(); printf("%d\n", test.size); printf("%d\n", TestClass.size); test.print(); return 0; }
Dec 05 2002
ClassInfo will eventually be expanded to support complete information about the class, but at the moment it has just enough in it too keep the runtime working, you can see the members in object.d. "Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message news:asnhup$2qo1$1 digitaldaemon.com...Is the .classinfo property not implemented or partially implemented at this point? It seems that it provides no useful information right now. Since there isn't any documentation on it, I don't know that I'm using it correctly. below is the test program that I wrote to take a look at it, but all that it outputs is: 4 Object 004140A0 4 4 Object 008A2EE0 which isn't amazingly helpful, since print()'ing a class object seems to do very little, honestly. (I'm assuming that the number is a pointer or reference to some static value for the class? What state is classinfo at? What are your goals for it? I can think of some useful things to do with it, but in it's current, undocumented state, it seems like more of a placeholder. Please let me know if I'm missing something. Evan //////////////////////////////////////////////////////////////// class TestClass { private: int testInt; TestClass* next, parent; public: int GetTestInt() { return testInt; } } int main (char[][] args) { TestClass test = new TestClass; ClassInfo ci = TestClass.classinfo; printf("%d\n", ci.size); ci.print(); printf("%d\n", test.size); printf("%d\n", TestClass.size); test.print(); return 0; }
Dec 14 2002
Walter wrote:ClassInfo will eventually be expanded to support complete information about the class, but at the moment it has just enough in it too keep the runtime working, you can see the members in object.d.So, something like a list of all of the types of the classes? That's all that I can think of that would be holding back some sort of generic serialization stuff for the language at the moment. Something like that would also have a nice impact on the garbage collection stuff that we were talking about earlier. Any idea when it will go in? Evan
Dec 15 2002
"Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message news:ati7eb$26ju$1 digitaldaemon.com...So, something like a list of all of the types of the classes?A list of all the members, offsets, and types.That's all that I can think of that would be holding back some sort of generic serialization stuff for the language at the moment. Something like that would also have a nice impact on the garbage collection stuff that we were talking about earlier. Any idea when it will go in?At the moment, I'm trying to get DMC++ to compile Boost. When that is successful, I'll turn back to D and start digging at the small mountain of issues about it <g>. I need to clone myself...
Dec 15 2002
Walter wrote:"Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message news:ati7eb$26ju$1 digitaldaemon.com...I'd offer to help professionally (HAH!) this coming summer, but I don't really have the skills to do any sort of low level compiler work. You're doing a great great job, and doing an amazing amount of work, considering that you're just one person. Since naysayers and complaints generally dominate online forums, just thought that I'd offer and explicit word of support. EvanSo, something like a list of all of the types of the classes?A list of all the members, offsets, and types.That's all that I can think of that would be holding back some sort of generic serialization stuff for the language at the moment. Something like that would also have a nice impact on the garbage collection stuff that we were talking about earlier. Any idea when it will go in?At the moment, I'm trying to get DMC++ to compile Boost. When that is successful, I'll turn back to D and start digging at the small mountain of issues about it <g>. I need to clone myself...
Dec 16 2002
"Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message news:atkanj$18ho$1 digitaldaemon.com...I'd offer to help professionally (HAH!) this coming summer, but I don't really have the skills to do any sort of low level compiler work. You're doing a great great job, and doing an amazing amount of work, considering that you're just one person. Since naysayers and complaints generally dominate online forums, just thought that I'd offer and explicit word of support.Thanks. Just for perspective, ask some other compiler vendors how many people work on just their C++ compiler <g>.
Dec 16 2002