d
Solution in Java expressed in D (reflection)
I am reimplementing a java program in D. I have used the factory pattern, that is, from the data \"myclass\" \"5.3 ,6,8,10\", I use reflection to call the construct开发者_StackOverflow中文版or[详细]
2023-03-14 19:28 分类:问答Where is alias this defined
When programming a C++ application I needed a class that supported interfaces.After implmenting it with MI is had a big ugh moment when I realized if I wasn\'t careful I would introduce diamond inheri[详细]
2023-03-14 15:31 分类:问答D language cast operator overload problem
I\'m playing with D2 at the moment, I would like to write some simple program but i\'m stuck with operator cast overload...I have a Vector class 开发者_运维问答that can be cast to Normal :[详细]
2023-03-14 09:51 分类:问答Obtaining a plain char* from a string in D?
I\'m having an absolute hell of a time trying to figure out how to get a plain, mutable C string (a 开发者_运维知识库char*) from a D string (a immutable(char)[]) to that I can pass the character data[详细]
2023-03-14 05:48 分类:问答Is there a way to convert a function variable to a string in D?
Is there any way, given a function variable, to get the name of the function as a string? For example, if I have:[详细]
2023-03-14 03:15 分类:问答What is the '\?' Escape Sequence in D?
开发者_运维问答What is the \\? string escape sequence in D?It\'s just to escape ?, a literal question mark.[详细]
2023-03-12 12:41 分类:问答Defining variable length structs and casting to them
In C, you sometimes see something like: struct foobar { int size; int data[1]; }; where the data member doesn\'t really have just one element; rather it\'s meant to be variable length.[详细]
2023-03-12 09:18 分类:问答Overriding .init in custom type in D
I remember having read 开发者_开发问答somewhere that it\'s possible to override the .init property of custom types in D. I\'d like to do this for a struct I\'ve created, but I\'m not finding any way t[详细]
2023-03-12 08:28 分类:问答Can traits in D be used for type classes?
I\'m new to D, and I\'m looking for a good way to program with Haskell-like type classes e.g. Functors, Monoids, etc. in D.[详细]
2023-03-12 05:39 分类:问答Casting ClutterActor* to ClutterStage*
I am exploring the possibility of creating a Clutter binding for the D language ( http://d-programming-language.org/) and have started by[详细]
2023-03-11 16:06 分类:问答