Lib change leads to larger executables
kris
foo at bar.com
Wed Feb 21 14:01:52 PST 2007
Walter Bright wrote:
> kris wrote:
>
>> It also finds that particular one whether the module is listed first
>> or last in the lib response-file.
>
>
> I bet that's because that module was imported (directly or indirectly)
> by every other module that used char[][], and so it was the only module
> that defines it.
>
>> What is one supposed to do for production-quality libraries?
>
>
> Some strategies:
>
> 1) minimize importing of modules that are never used
>
> 2) for modules with a lot of code in them, import them as a .di file
> rather than a .d
>
> 3) create a separate module that defines the relevant typeinfo's, and
> put that first in the library
1) Tango takes this very seriously ... more so than Phobos, for example.
2) That is something that could be used in certain scenario's, but is
not a general or practical solution for widespread use of D.
3) Hack around an undocumented and poorly understood problem in
developer-land. Great.
you might as well add:
4) have the user instantiate a pointless and magic char[][] in their own
program, so that they can link with the Tango library?
None of this is not gonna fly in practice, and you surely know that?
I get a subtle impression that you're being defensive about the problem
rather than actively thinking about a practical solution? We're trying
to help D get some traction here, yet it seems you're not particularly
interested in removing some roadblocks? Or are you scheming a resolution
in private?
"frustrated with D tools again"
More information about the Digitalmars-d
mailing list