trait to get the body code of a function?
Seb
seb at wilzba.ch
Thu Jul 26 14:44:53 UTC 2018
On Wednesday, 25 July 2018 at 19:10:03 UTC, 12345swordy wrote:
> On Wednesday, 25 July 2018 at 19:05:08 UTC, Guillaume Lathoud
> wrote:
>> On Wednesday, 25 July 2018 at 04:46:20 UTC, rikki cattermole
>> wrote:
>>> On 25/07/2018 5:32 AM, Guillaume Lathoud wrote:
>>>> Thanks for all the answers. I've just had a look at an
>>>> alternative: using dmd as a package. However that's a lot of
>>>> doc to browse... Maybe someone has experience with dmd as a
>>>> package?
>>>
>>> Not a solution. Leaks memory, not reusable and in general not
>>> very friendly to work with.
>>
>> Thanks.
>
> Please submit a bug report to Bugzilla on this, as I am also
> interest in this.
>
> Alexander
I once had a similar PR in DMD to a potential
`__traits(getFunctionBody, X)` for `__traits(documentation, X)`:
https://github.com/dlang/dmd/pull/6872
There was a bit of a forum discussion about it:
https://forum.dlang.org/post/cwjtsmnwwwwepvgvlqcy@forum.dlang.org
The gist:
>> Putting this in the Phantom Zone due it needing a compelling
>> use case(s) to justify consuming memory and compilation time.
>> <<
tl;dr: just Bugzilla won't do it. It will need a short DIP
illustrating use cases. Sorry. Happy to implement it for you
though.
More information about the Digitalmars-d-learn
mailing list