On 28/05/2024 18:24, shakfu wrote:
> While it is possible to separate the functionality into separate
> imports (which I have indeed tested as a variant), the issue is that
> the optional code makes the core extension 16x to 20x larger, so it
> would be not make sense to package the optional imports with the core
> extension.
I really don't understand this point. Surely the optional code makes the
module larger whether it's included by IF or in separate modules?
So either:
* you're distributing source files for the user to build (in which case
both options have a similar cost)
* you're always distributing a full binary module with the optional
code, in which case distributing the optional imports is the same cost,
* you're always distributing a cut-down binary module with the optional
code, in which case you just don't distribute the compiled optional modules.
However: `IF/DEF` isn't going away any time soon, even if it is
deprecated. Therefore if you find it the best solution, then keep using
it for now.