Asking for advice - assert for ImportC
Adam D Ruppe
destructionator at gmail.com
Fri Apr 29 14:34:16 UTC 2022
On Friday, 29 April 2022 at 13:15:10 UTC, Guillaume Piolat wrote:
> When are they needed?
They are never needed, per se, but they have some potential in
improving compile time by caching some results and hiding
implementations. Especially combined with local imports, hiding
the body can hide the entire import web, which can hide whole
ctfe calculations.
I also think we can set it to avoid template generations by doing
them extern if it is already in the lib which can further help
compile times if all goes well.
The hard part is keeping it in sync. The compiler won't help you
at all, aside from its -H generation, which isn't great. And if
you forget to regenerate, you have possible ABI mismatch; the
compiler won't check against an intended thing.
(This is something I'd love to see a dub 2.0 tackle.)
More information about the Digitalmars-d
mailing list