digitalmars.D - Meta-Programming
- Mahe (8/8) May 25 2007 Hi,
- David B. Held (7/13) May 25 2007 This is usually called "reflection", since it doesn't really imply code
- Sean Kelly (7/25) May 25 2007 Yup. About the only issue I have with metaprogramming in D (which this
- Craig Black (5/21) May 25 2007 No, a VM is not a requirement for introspection. Walter should be addin...
Hi, I have worked with D for some months. It is much better than C++ and a good Meta-Programming! In D it is only possible to create a class with a standard constructor from a string with a class name in it. But there is no introspection of the structure of the class, no dynamic method calls, no dynamic attribute reading or setting. But such reflection possibilities are important in component based software design of large systems. Also some notation of extra metadata to classes, fields and methods would be good, like Java-Annotations. This would also be a powerful feature. I don't know if for such features a VM is necessary! Bye!
May 25 2007
Mahe wrote:I have worked with D for some months. It is much better than C++ and a good Meta-Programming! In D it is only possible to create a class with a standard constructor from a string with a class name in it. But there is no introspection of the structure of the class, no dynamic method calls, no dynamic attribute reading or setting. But such reflection possibilities are important in component based software design of large systems. [...]This is usually called "reflection", since it doesn't really imply code generation the way templates and macros does. D does provide reflection through type tuples and class constructors, but it could use some better of the water. Dave
May 25 2007
David B. Held wrote:Mahe wrote:Yup. About the only issue I have with metaprogramming in D (which this thread made me think of) is the lack of support for template class ctors. And peripherally, I don't think there's any way to get a ParameterTypeTuple for a class ctor either. I ran into this the other day and finally had to use an alias for the ctor arg list. SeanI have worked with D for some months. It is much better than C++ and a But I think a really powerful aspect is missing in D compared to In D it is only possible to create a class with a standard constructor from a string with a class name in it. But there is no introspection of the structure of the class, no dynamic method calls, no dynamic attribute reading or setting. But such reflection possibilities are important in component based software design of large systems. [...]This is usually called "reflection", since it doesn't really imply code generation the way templates and macros does. D does provide reflection through type tuples and class constructors, but it could use some better of the water.
May 25 2007
No, a VM is not a requirement for introspection. Walter should be adding better reflection/introspection in the coming months. -Craig "Mahe" <maheweb web.de> wrote in message news:f36u6e$168a$1 digitalmars.com...Hi, I have worked with D for some months. It is much better than C++ and a Meta-Programming! In D it is only possible to create a class with a standard constructor from a string with a class name in it. But there is no introspection of the structure of the class, no dynamic method calls, no dynamic attribute reading or setting. But such reflection possibilities are important in component based software design of large systems. Also some notation of extra metadata to classes, fields and methods would be good, like Java-Annotations. This would also be a powerful feature. I don't know if for such features a VM is necessary! Bye!
May 25 2007