const debacle

Janice Caron caron800 at googlemail.com
Sat Mar 22 08:02:01 PDT 2008


On 22/03/2008, Lars Ivar Igesund <larsivar at igesund.net> wrote:
>  > Now library developers just have to begin using this kind of aliases for
>  > templates which get only used with a few, known types
>
> They're not because current tool chain is not able to remove the unused
>  variations from the executables, thus you're likely to get 3 times the
>  codegen that you need, also called bloat.

If that's true then the solution is to fix the linker.

This thread is about looking ahead to what /could/ be possible, not
about what is possible now. We /could/ implement return types whose
constancy is dependent on input types, if, in the future, if (1) the
suggestions I made are implemented, and (2) the linker is optimised to
remove that which is unused. As a side-effect, Sean's
three-types-of-string example would then also benefit from that linker
optimisation.

That said, I'm /very/ surprised to hear that OptLink can't do that already.



More information about the Digitalmars-d mailing list