Re: Pretty fields string

2012-02-29 Thread Andrej Mitrovic
On 2/29/12, Andrej Mitrovic 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 http://d.puremagic.com/issues/show_bug.

Re: Pretty fields string

2012-02-29 Thread Andrej Mitrovic
On 2/29/12, Philippe Sigaud 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)? > - unittests insi

Re: Pretty fields string

2012-02-29 Thread Andrej Mitrovic
On 2/29/12, Jacob Carlborg 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 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 std.r

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 ali

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.

Pretty fields string

2012-02-29 Thread Andrej Mitrovic
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 std.range; struct Foo { int one = 1; @prop