describe-d: an introspection library
bogdan
szabobogdan3 at gmail.com
Wed Apr 15 08:00:12 UTC 2020
On Tuesday, 14 April 2020 at 10:55:13 UTC, WebFreak001 wrote:
> On Monday, 13 April 2020 at 12:11:03 UTC, bogdan wrote:
>> Hi!
>>
>> I wrote this small `describe-d` library to allow me to do more
>> readable introspection in some of my projects.
>>
>> Any feedback is appreciated!
>>
>> Thanks,
>> Bogdan
>>
>> [1] https://gitlab.com/szabobogdan3/describe-d
>> [2] https://code.dlang.org/packages/describe-d
>
> cool library, looks really useful for writing big introspection
> projects, but on the other hand also looks like this would
> significantly increase compilation time currently. Have you
> done any benchmarks how your methods compare (RAM, CPU time) to
> traits? While I love the syntax and the idea, I think with
> current CTFE and templates it would be quite a big hit to use
> in a project.
Thanks!
I did not make any performance measurements. If you know how
could I do this at compile time, it would be awesome. I think, I
would need to watch the compiler process for this. If there is no
other way, I'll do it like this after I will have a more concrete
APIs.
Usually templates take more time to compile that CTFE, that's why
I intend to use less templates, or none, if is possible. I expect
to see an increase in the compilation time, but It should not be
exponential. I am doing this, because I work a lot with
introspection, and some of my projects are hard to read because
of all this mess around traits an templates.
That made me think that, I could give a few more seconds to the
compiler to have a more readable code. I'll update my projects to
use this library to see how the compilation performance will
change.
Bogdan
More information about the Digitalmars-d-announce
mailing list