Re: Pretty fields string

2012-02-29 Thread Andrej Mitrovic
Just noticed there's an std.traits import missing. I hate how D silently ignores that FunctionTypeOf is left undefined.

Re: Pretty fields string

2012-02-29 Thread Philippe Sigaud
I've done this a couple of times before but I always had issues, e.g. functions and property calls would be mixed in. But I think I have a good go-to function now: Nice. What does it give for: - function overloads (PITA that)? - type aliase (alias int Int;)? - function aliases or member

Re: Pretty fields string

2012-02-29 Thread Jacob Carlborg
On 2012-02-29 10:58, Andrej Mitrovic wrote: I've done this a couple of times before but I always had issues, e.g. functions and property calls would be mixed in. But I think I have a good go-to function now: import std.algorithm; import std.conv; import std.string; import std.stdio; import

Re: Pretty fields string

2012-02-29 Thread Andrej Mitrovic
On 2/29/12, Jacob Carlborg d...@me.com wrote: Seems like what I have in my serialization library Orange: Sweet. I was gonna take a look at Orange for just this purpose. Thanks.

Re: Pretty fields string

2012-02-29 Thread Andrej Mitrovic
On 2/29/12, Philippe Sigaud philippe.sig...@gmail.com wrote: Nice. What does it give for: - function overloads (PITA that)? - type aliase (alias int Int;)? - function aliases or member aliases? - inner templates (struct template, etc, not pure template as these are not allowed in a struct)?

Re: Pretty fields string

2012-02-29 Thread Andrej Mitrovic
On 2/29/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Just noticed it doesn't work ok if there's a nested template declaration in a struct. It would say Error: cannot resolve type for t.temp(T). Correction: it was the unittest block that was problematic. I've filed it