[fpc-devel] Little feature teaser

Flávio Etrusco flavio.etrusco at gmail.com
Fri Aug 2 17:50:43 CEST 2013


On Fri, Aug 2, 2013 at 12:34 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> On 02.08.2013 17:01, Mattias Gaertner wrote:
>>
>> On Fri, 02 Aug 2013 13:18:53 +0200
>> Sven Barth <pascaldragon at googlemail.com> wrote:

(...)

>> What about code size?
>
>
> The code size for one unit is the same as if you had (in that example)
> declared a variant of "IsIn" for each "LongInt" and "String". So for each
> "IsIn<T>" specialization with different types new code is generated if it
> does not yet exist in that unit. This means that if you call "IsIn<LongInt>"
> in different units you'll have a "IsIn<LongInt>" implementation in each
> unit. This is the same as for generic types btw.
>
> Regards,
> Sven


And the same (problem) in C++. Is there some proposal to mitigate the
code duplication? Or the official position is that if the project is
big enough to suffer from the bloat it should avoid itself the
duplicate declarations?

Regards,
Flávio



More information about the fpc-devel mailing list